-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·51 lines (38 loc) · 2.26 KB
/
setup.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
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC1090,1091
SOURCE_LOCATION="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" &> /dev/null && pwd 2> /dev/null)"
export SOURCE_LOCATION
# Load external configurations
for config in "$SOURCE_LOCATION"/bin/{colors,commands,helpers,installer}.sh; do
source "$config"
done
printf "\033c"
cat << EOF
▄██████▄ ▄████████ ███ █▄ ████████▄ ▄█
███ ███ ███ ███ ███ ███ ███ ▀███ ███
███ █▀ ███ ███ ███ ███ ███ ███ ███▌
▄███ ███ ███ ███ ███ ███ ███ ███▌
▀▀███ ████▄ ▀███████████ ███ ███ ███ ███ ███▌
███ ███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ▄███ ███
████████▀ ███ █▀ ████████▀ ████████▀ █▀
Greetings $(whoami) .....
Gaudi is a tool that allows you to install a set of predefined software lists!
Please make sure to follow the instructions carefully to avoid any unneeded installations.
The following script will set up your machine based on the various configurations specified in the config files
EOF
# Get the operating system and shell type
get_os
get_shell_type
[[ $GAUDI_SHELL != "bash" ]] && printf '\n%sgaudi requires bash as your interactive shell! Please adjust accordingly and re-run the setup%s\n' "$RED" "$NC" && exit 1
# Run installation steps
for step in "${SOURCE_LOCATION}/lib/${OS}/install-pre-requisits.sh" \
"${SOURCE_LOCATION}/configs/configure-ssh.sh" \
"${SOURCE_LOCATION}/configs/configure-gaudi.sh" \
"${SOURCE_LOCATION}/lib/install-shell-helpers.sh" \
"${SOURCE_LOCATION}/lib/install-software.sh" \
"${SOURCE_LOCATION}/lib/${OS}/configure.sh"; do
source "$step"
done
_echo "Setting up your machine with gaudi is finished! Enjoy"