summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-11-22 16:57:51 -0600
committerCraig Jennings <c@cjennings.net>2024-11-22 16:57:51 -0600
commit456650b531eddc55a2ffda9418e7b5b10118d6f0 (patch)
tree3e46f9585bfafd90d4736f3ab52f3837cea627ed
parent9d7bec25b4a78a44bbc9fb15dd20bdc8c101e5db (diff)
using case statement; testing read functionality
-rwxr-xr-xinit31
1 files changed, 19 insertions, 12 deletions
diff --git a/init b/init
index b9d0d4d..14a671e 100755
--- a/init
+++ b/init
@@ -66,17 +66,24 @@ echo " (2) turn a base install into a full workstation"
echo " (3) generate a workstation in an arch distrobox container"
echo " (4) allow ssh to this live iso"
echo " (Enter 1, 2, or 3) :"
+
read setup
-if [ "$setup" = "1" ]; then
- echo "this will call the archinstall script"
-elif [ "$setup" = "2" ]; then
- echo "this will call the archsetup script"
-elif [ "$setup" = "3" ]; then
- echo "this will call the archsetup-distrobox script"
-elif [ "$setup" = "4" ]; then
- setup_ssh
-else
- echo "Error: Unknown setup option. Please enter 'arch' or 'ssh'."
- exit 1
-fi
+case $setup in
+ 1)
+ echo "this will call the archinstall script"
+ ;;
+ 2)
+ echo "this will call the archsetup script"
+ ;;
+ 3)
+ echo "this will call the archsetup-distrobox script"
+ ;;
+ 4)
+ setup_ssh
+ ;;
+ *)
+ echo "Error: Unknown setup option. Please enter 1,2,3,or 4."
+ exit 1
+ ;;
+esac