Skip to content

Commit 5cc8d6c

Browse files
authored
Update installServer.sh
1 parent 4e1596f commit 5cc8d6c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

installServer.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
#!/bin/bash
22

3-
# Check if --gui flag is provided
3+
# Default to not installing GUI
44
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
912
done
1013

11-
echo -e "\e[1;36m[*] Installing axs(acodeX-server)... \e[0m"
14+
echo -e "\e[1;36m[*] Installing acodeX-server... \e[0m"
1215
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'
1417

18+
# Only install GUI if the --gui flag was provided
1519
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"
1721
pkg install x11-repo -y
1822
pkg install tigervnc -y
1923
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"
2125
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"
2327
fi

0 commit comments

Comments
 (0)