-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·51 lines (45 loc) · 1.04 KB
/
install.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
#!/bin/bash
# Check if dialog is installed
if ! command -v dialog &> /dev/null
then
echo "Dialog is not installed. Please install it using: sudo apt-get install dialog"
exit 1
fi
# Unzip ghubenv.zip
if [ -f "ghubenv.zip" ]; then
unzip -o ghubenv.zip
if [ $? -ne 0 ]; then
echo "Failed to unzip ghubenv.zip. Exiting."
exit 1
fi
else
echo "ghubenv.zip not found. Exiting."
exit 1
fi
# Create a menu using dialog
CHOICE=$(dialog --clear --backtitle "Language Selection" \
--title "Choose language" \
--menu "Select an option:" 15 40 4 \
1 "english" \
2 "polish" \
3>&1 1>&2 2>&3 3>&-)
# Capture the exit status of dialog (e.g., if the user presses ESC)
EXIT_STATUS=$?
clear
if [ $EXIT_STATUS -eq 1 ]; then
echo "No option selected. Exiting."
exit 1
fi
# Execute the appropriate script based on the user's choice
case $CHOICE in
1)
./install/installen.sh
;;
2)
./install/installpl.sh
;;
*)
echo "Invalid option selected. Exiting."
exit 1
;;
esac