-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.sh
executable file
·57 lines (48 loc) · 1.3 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
#! /bin/bash
export path_script=$(pwd)
source $path_script/utils.sh
#source $path_script/manual_installation.sh
source $path_script/version_management.sh
source $path_script/display.sh
initialize
handle_cli_args $@
#get scripts
export autoscripts=()
export manualscripts=()
export automenupoints=()
export manumenupoints=()
generate_software_version_catalogue
if $dry; then
get_selections
exit
fi
if [ ! -v $config_file ]; then
if ! read_conf $config_file; then
echo "You can see which sofware and which versions of it are supported by this suite by taking a look at:
$(realpath $path_config/reference.conf)"
exit 1
else
source $config_file
fi
fi
#show the querry whether the installation should proceed automatically
if ! $automated ; then
display_automation_question
fi
#run the scripts in numerical order
## After all scripts beginning with 0 are done, trigger the manual installation, then resume with the remaining automated ones
manual_step_done=false
for script in $autoscripts; do
if [ $manual_step_done == false ] && [[ $script != 0* ]]; then
display_manual_step_selection
manual_step_done=true
fi
echo $script
sleep 3
echo "Executing $script..."
call_and_log $path_auto/$script
if [[ $? != 0 ]]; then
echo "ERROR! $script finished with exit code $?!"
fi
sleep 1
done