-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.sh
executable file
·61 lines (53 loc) · 1.34 KB
/
main.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
#!/bin/bash
# Author: Daniel Wood (Woody)
# Last Updated: 2023-09-28
# Purpose: To save time Installing and setup development utilities and packages
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$BASE_DIR/read-config.sh"
source "$BASE_DIR/utils.sh"
check_internet
# This is main.sh
function show_usage {
echo "Usage: main.sh <command> [<args>]"
echo "Commands:"
echo " docker-setup Run docker setup"
echo " full-setup Run full setup"
echo " git-setup Setup git"
echo " install-node Install Node.js"
echo " install-packages Install packages in config"
echo " system-info Show system information"
}
if [ $# -eq 0 ]; then
show_usage
exit 1
fi
command="$1"
shift
case "$command" in
"docker-setup")
source docker_setup.sh "$@"
;;
"full-setup")
source setups/full_setup.sh "$@"
;;
"git-setup")
source setups/git_setup.sh "$@"
;;
"install-node")
source installs/install_node.sh "$@"
;;
"install-packages")
source installs/install_packages.sh "$@"
;;
"read-config")
source read-config.sh "$@"
;;
"system-info")
source system_info.sh "$@"
;;
*)
echo "Unknown command: $command"
show_usage
exit 1
;;
esac