corrected some debug codesnips

This commit is contained in:
Daniel Heule 2014-02-27 15:47:19 +01:00
parent 8d80e52de9
commit 0198b99eb5
3 changed files with 8 additions and 2 deletions

View file

@ -48,6 +48,10 @@ BEGIN {
if(i == 1) { if(i == 1) {
delval = substr($0,length(key)+1) delval = substr($0,length(key)+1)
delpos = index(delval,delimiter) delpos = index(delval,delimiter)
if(delpos == 0) {
# in this case, the delimiter was not found
next
}
if(delpos > 1) { if(delpos > 1) {
spaces = substr(delval,1,delpos-1) spaces = substr(delval,1,delpos-1)
sub(/[ \t]*/,"",spaces) sub(/[ \t]*/,"",spaces)

View file

@ -53,7 +53,9 @@ case "$state_should" in
*) *)
echo "Unknown explorer state: $state_is" >&2 echo "Unknown explorer state: $state_is" >&2
exit 1 exit 1
;;
esac esac
;;
present) present)
case "$state_is" in case "$state_is" in
absent) absent)
@ -68,11 +70,13 @@ case "$state_should" in
*) *)
echo "Unknown explorer state: $state_is" >&2 echo "Unknown explorer state: $state_is" >&2
exit 1 exit 1
;;
esac esac
;; ;;
*) *)
echo "Unknown state: $state_should" >&2 echo "Unknown state: $state_should" >&2
exit 1 exit 1
;;
esac esac
cat <<__CDIST_HEREDOC_END_HERE_MARKER cat <<__CDIST_HEREDOC_END_HERE_MARKER
@ -184,5 +188,4 @@ END {
} }
AWK_EOF AWK_EOF
mv -f "\$tmpfile" "$file" mv -f "\$tmpfile" "$file"
exit 1
__CDIST_HEREDOC_END_HERE_MARKER __CDIST_HEREDOC_END_HERE_MARKER