-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppInstall.sh
executable file
·44 lines (36 loc) · 1.37 KB
/
AppInstall.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
#!/bin/bash
clear
APPINST_SCRIPT="$(realpath "$0")"
export APPINST_BASEDIR="$(dirname "$APPINST_SCRIPT")"
export APPINST_APPS_PATH="$(realpath "$HOME/Apps")"
# cd $APPINST_BASEDIR && ruby AppInstall.rb
cd $APPINST_BASEDIR
BASEDIR="$APPINST_BASEDIR/src"
source $BASEDIR/helpers/colors.sh
source $BASEDIR/helpers/profile.sh
source $BASEDIR/helpers/multiselect.sh
APPINST_APPS_LIST=(
'Git ; git'
'Zsh ; zsh'
'Chrome ; chrome'
'Docker ; docker'
'asdf ; asdf'
'Vscode ; vscode'
'AWS CLI ; aws'
'FreeTDS ; free_tds'
'Azure Data Studio ; azure_data_studio'
'FFMPEG (Latest) ; ffmpeg'
'Update AppInstall ; update'
)
multiselect APPINST_APPS_SELECTED APPINST_APPS_LIST
# check if an option has been entered
if [ ${#APPINST_APPS_SELECTED[@]} -eq 0 ]; then
show_error_log "Error! Select at least one option"
fi
for APPINST_APP in "${APPINST_APPS_SELECTED[@]}"; do
if [ -f "$BASEDIR/$APPINST_APP.sh" ]; then
bash $BASEDIR/$APPINST_APP.sh
else
show_error_log "'$APPINST_APP' is not a valid option!"
fi
done