forked from rubenswebdev/scripts-ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-phpcs.bash
executable file
·51 lines (35 loc) · 1.03 KB
/
install-phpcs.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Rode com sudo, ou como root"
exit
fi
echo "Updating the repos"
apt-get update > /dev/null
echo "Upgrading what it have to do so"
apt-get upgrade -y > /dev/null
echo "Installing required packages"
apt-get install -y php-pear ocaml > /dev/null
echo "Installing PHP Code Sniffer"
pear install PHP_CodeSniffer
echo "Installing PHP Depend"
pear channel-discover pear.pdepend.org
pear install pdepend/PHP_Depend
echo "Installing PHP Mess Detector"
curl http://static.phpmd.org/php/2.2.1/phpmd.phar -o "/usr/bin/phpmd"
chmod +x "/usr/bin/phpmd"
echo "Installing PHPcs Fixer"
curl "http://get.sensiolabs.org/php-cs-fixer.phar" -o "/usr/local/bin/php-cs-fixer"
chmod a+x "/usr/local/bin/php-cs-fixer"
echo "Installing facebook pfff"
cd /opt/
git clone --depth 1 https://github.com/facebook/pfff.git
cd /opt/pfff
echo "Configuring pfff"
./configure > /dev/null
echo "Making depend"
make depend > /dev/null
echo "Making generic"
make > /dev/null
echo "Making opt"
make opt > /dev/null
echo "Done."