-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·41 lines (34 loc) · 988 Bytes
/
run.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
#!/bin/bash
FULL_PATH=$(realpath $0)
DIR_PATH=$(dirname $FULL_PATH)
source "$DIR_PATH/config.sh"
source "$DIR_PATH/helpers.sh"
if [ -n "$1" ] && [ "help" != "$1" ]; then
case $1 in
utils | \
stack | \
uninstall | \
tail | \
host | \
sql | \
wp)
source "$DIR_PATH/scripts/$1.sh"
exit 0
;;
*)
print_error "Incorrect command."
;;
esac
else
echo -e "Run my custom commands!\n"
echo -e "Type 'run [command] help' for more information.\n"
echo -e "Available commands:\n"
echo -e " ${GREEN}utils${NC} | Shorthand commands."
echo -e " ${GREEN}stack${NC} | STACK services."
echo -e " ${GREEN}uninstall${NC} | Uninstall a package."
echo -e " ${GREEN}tail${NC} | Colored log output with follow."
echo -e " ${GREEN}host${NC} | Configure NGINX hosting."
echo -e " ${GREEN}sql${NC} | Run SQL queries."
echo -e " ${GREEN}wp${NC} | WordPress utilities."
exit 0
fi