Skip to content

Commit 4e1596f

Browse files
authored
Fixed installServer.sh
1 parent 54acbd4 commit 4e1596f

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

installServer.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
#!/bin/bash
2-
echo -e "\e[1;36m[*] Installing acodeX-server... \e[0m"
2+
3+
# Check if --gui flag is provided
4+
INSTALL_GUI=false
5+
for arg in "$@"; do
6+
if [[ "$arg" == "--gui" ]]; then
7+
INSTALL_GUI=true
8+
fi
9+
done
10+
11+
echo -e "\e[1;36m[*] Installing axs(acodeX-server)... \e[0m"
312
curl -L https://raw.githubusercontent.com/bajrangCoder/acodex_server/main/install.sh | bash
4-
echo -e '\e[1;32m`acodeX-server` installed successfully. Run `axs` to start the server. \e[0m'
13+
echo -e '\e[1;32m`axs(acodeX-server)` installed successfully. Run `axs` to start the server. \e[0m'
514

6-
# Final GUI prompt after installation completes
7-
echo -e "\e[1;36mDo you want to install GUI-related packages to run gui apps in acodex? (y/n)\e[0m"
8-
read -r gui_response_acodex
9-
if [[ "$gui_response_acodex" =~ ^[Yy]$ ]]; then
10-
echo -e "\e[1;36m[*] Installing GUI-related packages for acodeX-server...\e[0m"
15+
if $INSTALL_GUI; then
16+
echo -e "\e[1;36m[*] Installing GUI-related packages for axs(acodeX-server)...\e[0m"
1117
pkg install x11-repo -y
1218
pkg install tigervnc -y
1319
curl -L https://raw.githubusercontent.com/bajrangCoder/websockify_rs/main/install.sh | bash
14-
echo -e "\e[1;32mGUI packages for acodeX-server installed successfully. Run vncserver command and setup password to get started\e[0m"
20+
echo -e "\e[1;32mGUI packages for axs(acodeX-server) installed successfully. Run vncserver command and setup password to get started\e[0m"
1521
else
16-
echo -e "\e[1;33mSkipping GUI installation for acodeX-server. You can install it later if needed.\e[0m"
22+
echo -e "\e[1;33mSkipping GUI installation for axs(acodeX-server). You can install it later using --gui flag.\e[0m"
1723
fi

0 commit comments

Comments
 (0)