replace if/elif in sxmo_network.sh with case

Signed-off-by: Stacy Harper <contact@stacyharper.net>
master
noneofyourbusiness 4 years ago committed by Stacy Harper
parent c183530b38
commit f361cf7139
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 30
      scripts/core/sxmo_networks.sh

@ -103,25 +103,35 @@ networksmenu() {
" | " |
awk '{$1=$1};1' | grep '\w' | dmenu -c -p 'Networks' -l 14 awk '{$1=$1};1' | grep '\w' | dmenu -c -p 'Networks' -l 14
)" )"
if [ "$CHOICE" = "System Menu" ]; then case "$CHOICE" in
"System Menu" )
sxmo_appmenu.sh sys && exit sxmo_appmenu.sh sys && exit
elif [ "$CHOICE" = "Close Menu" ]; then ;;
"Close Menu" )
exit exit
elif [ "$CHOICE" = "Add a GSM Network" ]; then ;;
"Add a GSM Network" )
addnetworkgsmmenu addnetworkgsmmenu
elif [ "$CHOICE" = "Add a WPA Network" ]; then ;;
"Add a WPA Network" )
addnetworkwpamenu addnetworkwpamenu
elif [ "$CHOICE" = "Delete a Network" ]; then ;;
"Delete a Network" )
deletenetworkmenu deletenetworkmenu
elif [ "$CHOICE" = "Launch Nmtui" ]; then ;;
"Launch Nmtui" )
st -e nmtui & st -e nmtui &
elif [ "$CHOICE" = "Launch Ifconfig" ]; then ;;
"Launch Ifconfig" )
st -e watch -n 2 ifconfig & st -e watch -n 2 ifconfig &
elif [ "$CHOICE" = "Scan Wifi Networks" ]; then ;;
"Scan Wifi Networks" )
st -e watch -n 2 nmcli d wifi list & st -e watch -n 2 nmcli d wifi list &
else ;;
*)
toggleconnection "$CHOICE" toggleconnection "$CHOICE"
fi ;;
esac
done done
} }

Loading…
Cancel
Save