-
Notifications
You must be signed in to change notification settings - Fork 5
/
woohoo
executable file
·49 lines (31 loc) · 1.13 KB
/
woohoo
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
#!/usr/bin/env bash
export BASEPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source $BASEPATH/src/helper.sh
source $BASEPATH/config/config.sh
detect_platform
SUBCOMMAND=$1
shift 1
if [ "$SUBCOMMAND" == "install" ]; then
$BASEPATH/src/$PLATFORM/install.sh
elif [ "$SUBCOMMAND" == "verify" ]; then
$BASEPATH/src/$PLATFORM/verify.sh
elif [ "$SUBCOMMAND" == "config" ]; then
$BASEPATH/src/$PLATFORM/settings.sh
$BASEPATH/src/$PLATFORM/bash.sh config
$BASEPATH/src/$PLATFORM/zsh.sh config
$BASEPATH/src/$PLATFORM/git.sh config
$BASEPATH/src/$PLATFORM/gpg.sh config
$BASEPATH/src/$PLATFORM/ssh.sh config
elif [ "$SUBCOMMAND" == "ssh" ]; then
$BASEPATH/src/$PLATFORM/ssh.sh "$@"
elif [ "$SUBCOMMAND" == "gpg" ]; then
$BASEPATH/src/$PLATFORM/gpg.sh "$@"
elif [ "$SUBCOMMAND" == "help" ]; then
echo -e "Available subcommands:"
echo -e " install: Install programs you need"
echo -e " verify : Verify if programs are successfully installed"
echo -e " config : Configure programs you need"
echo -e " help : List the available subcommands"
else
$BASEPATH/woohoo help
fi