forked from teiesti/gico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgico.sh
executable file
·96 lines (93 loc) · 2.11 KB
/
gico.sh
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# Load environment variables
HOME_DIR=$(dirname $(readlink -f $BASH_SOURCE)) # could not be loaded within environment.sh because of chicken and egg
source $HOME_DIR/environment.sh
# Check if a command is given
if [ $# -lt 1 ]; then
$HOME_DIR/gico-help.sh
exit
fi
# Execute command
if [ $1 = "configure" ] || [ $1 = "install" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-configure.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "clone" ]; then
if [ $# -eq 2 ]; then
$HOME_DIR/gico-clone.sh $2
elif [ $# -eq 3 ]; then
$HOME_DIR/gico-clone.sh $2 $3
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "full-configure" ] || [ $1 = "full-install" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-full-configure.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "full-clone" ]; then
if [ $# -eq 2 ]; then
$HOME_DIR/gico-full-clone.sh $2
elif [ $# -eq 3 ]; then
$HOME_DIR/gico-full-clone.sh $2 $3
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "full-update" ] || [ $1 = "full-pull" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-full-update.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "init" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-init.sh
elif [ $# -eq 2]; then
$HOME_DIR/gico-init.sh $2
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "manage-packages" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-manage-packages.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "self-install" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-self-install.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "self-update" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-self-update.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "smart-configure" ] || [ $1 = "smart-install" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-smart-configure.sh
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "smart-clone" ]; then
if [ $# -eq 2 ]; then
$HOME_DIR/gico-smart-clone.sh $2
elif [ $# -eq 3 ]; then
$HOME_DIR/gico-smart-clone.sh $2 $3
else
$HOME_DIR/gico-help.sh
fi
elif [ $1 = "update" ] || [ $1 = "pull" ]; then
if [ $# -eq 1 ]; then
$HOME_DIR/gico-update.sh
else
$HOME_DIR/gico-help.sh
fi
else
$HOME_DIR/gico-help.sh
fi