From 90eb7f2980f6054e997fc1af21923e53338b0a0c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 18 Jul 2023 10:10:44 +0200 Subject: [PATCH] choice=$1 --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 844f4e9..1fd60e3 100755 --- a/install.sh +++ b/install.sh @@ -50,7 +50,10 @@ echo -e "${WHITE} [2] Arch Linux (pacman)" # added arch linux suppo echo -e "${WHITE} [0] Exit " echo -e "${COLOR}┌──($USER㉿$HOST)-[$(pwd)]" -read -p "└─$>>" choice +choice=$1 +if [[ $choice =~ ^[1-2]+$ ]]; then + read -p "└─$>>" choice +fi # Define installation directories