-
Notifications
You must be signed in to change notification settings - Fork 4
/
trash
49 lines (45 loc) · 1.23 KB
/
trash
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
printf "\n php Version: (Type 72 for php7.2, type 7.1 for php7.1 or 56 for php5.6 or 'n' to escape): "
read -r phpv
if [ -z "${phpv}" ]; then
phpv=72
printf "php7.2"
elif [ "${phpv}" == 7.1 ] || [ "${phpv}" == 71 ]; then
phpv=71
printf "php7.1"
elif [ "${phpv}" == 5.6 ] || [ "${phpv}" == 56 ]; then
phpv=56
printf "php7.1"
else
phpv=false
fi
if [ ! "${phpv}" == false ]; then
printf "\n Install Laravel (Y/n): "
read -r laravel
if [ -z "${laravel}" ] || [ "${laravel}" == Y ] || [ "${laravel}" == y ]; then
laravel=true
else
laravel=false
fi
printf "\n Install php Composer (Y/n): "
read -r phpcomposer
if [ -z "${phpcomposer}" ] || [ "${phpcomposer}" == Y ] || [ "${phpcomposer}" == y ]; then
phpcomposer=true
else
phpcomposer=false
fi
else
laravel=false
phpcomposer=false
fi
trap '' 2 # Signal 2 is Control-C, now disabled.
command
command
command
trap 2 # Reenables Control-C
git clone https://github.com/molovo/lumberjack
lumberjack/lj /usr/local/bin
lj --file /usr/local/var/log/myawesomescript.log --level critical
emergency, alert, critical, error, warning, notice, info or debug
lj critical ‘Something went wrong’
lj 'This is a notice'
command && command-to-execute-on-success || command-to-execute-on-failure