Newer
Older

Heiko Wolf
committed
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
#!/bin/bash
red="\e[0;91m"
green="\e[0;92m"
clean="\e[0m"
if [ $(which curl) != "/usr/bin/curl" ]
then
echo -e "\n${red}Benötigt curl.\n"
exit 1
else
reset
gitdir=$(pwd)
echo -e "${green}Installiere Codestylechecker...${clean}\n"
mkdir -p $HOME/bin/codestylechecker
cd $HOME/bin/codestylechecker
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
curl -OL https://alpha.finc.info/vufind2/logs/alpha/CodeSniffer.conf
chmod +x $HOME/bin/codestylechecker/phpcs.phar
echo -e "\n${green}Kopiere Hooks nach ${gitdir}/.git/hooks\n${clean}"
cd $gitdir/.git/hooks/
curl -OL https://alpha.finc.info/vufind2/logs/alpha/pre-commit
curl -OL https://alpha.finc.info/vufind2/logs/alpha/pre-push
chmod +x $gitdir/.git/hooks/pre-commit
chmod +x $gitdir/.git/hooks/pre-push
echo -e "\n${green}Fertig!${clean}\n"
exit 0
#heiko.wolf@uni-leipzig.de, 2021