fix for loops

This commit is contained in:
LinuxSquare 2024-09-12 20:23:30 +02:00
parent 8fd6887204
commit d316e5baee
2 changed files with 5 additions and 3 deletions

View file

@ -35,7 +35,7 @@ EOF
## SCRIPT START
###
while true; do
while [[ $# -gt 0 ]]; do
case "$(echo $1 | cut -d. -f1 | cut -d= -f1)" in
-h|--help)
usage

View file

@ -31,16 +31,18 @@ EOF
## SCRIPT START
###
while true; do
while [[ $# -gt 0 ]]; do
case "$(echo $1 | cut -d. -f1)" in
-h|--help)
usage
exit 0
;;
fileserver)
command="${1/./_/}" # replace dot . with underscore _
command="${1/./_}" # replace dot . with underscore _
break
;;
esac
shift
done
source ${ROOTPATH}/functions/run/$(echo "$command" | cut -d_ -f1)