File tree 1 file changed +14
-10
lines changed 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # Check if --gui flag is provided
3
+ # Default to not installing GUI
4
4
INSTALL_GUI=false
5
- for arg in " $@ " ; do
6
- if [[ " $arg " == " --gui" ]]; then
7
- INSTALL_GUI=true
8
- fi
5
+
6
+ # Check for arguments
7
+ while [[ " $# " -gt 0 ]]; do
8
+ case " $1 " in
9
+ --gui) INSTALL_GUI=true ;;
10
+ esac
11
+ shift
9
12
done
10
13
11
- echo -e " \e[1;36m[*] Installing axs( acodeX-server) ... \e[0m"
14
+ echo -e " \e[1;36m[*] Installing acodeX-server... \e[0m"
12
15
curl -L https://raw.githubusercontent.com/bajrangCoder/acodex_server/main/install.sh | bash
13
- echo -e ' \e[1;32m`axs( acodeX-server) ` installed successfully. Run `axs` to start the server. \e[0m'
16
+ echo -e ' \e[1;32m`acodeX-server` installed successfully. Run `axs` to start the server. \e[0m'
14
17
18
+ # Only install GUI if the --gui flag was provided
15
19
if $INSTALL_GUI ; then
16
- echo -e " \e[1;36m[*] Installing GUI-related packages for axs( acodeX-server) ...\e[0m"
20
+ echo -e " \e[1;36m[*] Installing GUI-related packages for acodeX-server...\e[0m"
17
21
pkg install x11-repo -y
18
22
pkg install tigervnc -y
19
23
curl -L https://raw.githubusercontent.com/bajrangCoder/websockify_rs/main/install.sh | bash
20
- echo -e " \e[1;32mGUI packages for axs( acodeX-server) installed successfully. Run vncserver command and setup password to get started\e[0m"
24
+ echo -e " \e[1;32mGUI packages for acodeX-server installed successfully. Run vncserver command and setup password to get started\e[0m"
21
25
else
22
- echo -e " \e[1;33mSkipping GUI installation for axs( acodeX-server). You can install it later using --gui flag.\e[0m"
26
+ echo -e " \e[1;33mSkipping GUI installation for acodeX-server. Use --gui flag to install later .\e[0m"
23
27
fi
You can’t perform that action at this time.
0 commit comments