From cbe501ec375c17cad258fe097977a2a8d631761a Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sat, 4 Jun 2016 22:18:27 +0200 Subject: [PATCH] When an option is set but not defined, just don't set the value --- astronaut/astronaut | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/astronaut/astronaut b/astronaut/astronaut index 9057243..9a36897 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -163,9 +163,13 @@ option() { local enabled=false local opt - local IFS=','; for opt in $options; do - local option="$(echo "$opt" | cut -d '=' -f 1)" - local value="$(echo "$opt" | cut -d '=' -f 2)" + local IFS=','; for option in $options; do + case "$option" in + *=*) + local value="$(echo "$option" | cut -d '=' -f 2)" + local option="$(echo "$option" | cut -d '=' -f 1)" + ;; + esac if [ "$option" = "$check" ]; then local enabled=true