sequencer - fix getopts case strings with -

This commit is contained in:
2022-12-11 08:47:36 +01:00
parent ba4eae5ef2
commit 44ae559918

View File

@@ -667,8 +667,8 @@ ask() {
while getopts "fny" arg; do while getopts "fny" arg; do
case "${arg}" in case "${arg}" in
-e) empty=1 ;; e) empty=1 ;;
-s) hidden="-s" ;; s) hidden="-s" ;;
*) ;; *) ;;
esac esac
done done
@@ -801,15 +801,15 @@ addConf() {
while getopts "acfms" ; do while getopts "acfms" ; do
case "${arg}" in case "${arg}" in
-c) # create a new file c) # create a new file
addConfMultiError "${confMode}" && confMode="-c" ;; addConfMultiError "${confMode}" && confMode="-c" ;;
-a) # append to existing file a) # append to existing file
addConfMultiError "${confMode}" && confMode="-a" ;; addConfMultiError "${confMode}" && confMode="-a" ;;
-s) # skip if CONFIGFILE exists s) # skip if CONFIGFILE exists
addConfMultiError "${confMode}" && confMode="-s" ;; addConfMultiError "${confMode}" && confMode="-s" ;;
-m) # only add content to missing conf and warn user m) # only add content to missing conf and warn user
addConfMultiError "${confMode}" && confMode="-m" ;; addConfMultiError "${confMode}" && confMode="-m" ;;
-f) # choose if source is a file or text f) # choose if source is a file or text
transferCmd="cat" ;; transferCmd="cat" ;;
*) ;; *) ;;
esac esac
@@ -1166,9 +1166,9 @@ initSeqConfig() {
while getopts "ept" arg ; do while getopts "ept" arg ; do
case "${arg}" in case "${arg}" in
-e) createEmpty=1 ;; e) createEmpty=1 ;;
-p) seqProfiles=1 ;; p) seqProfiles=1 ;;
-t) sourceAlways=1 ;; t) sourceAlways=1 ;;
*) ;; *) ;;
esac esac
done done