Permalink
Browse files

A couple more bashisms squashed

  • Loading branch information...
1 parent fce58cf commit 2caf8444dc421d61ffe57abf7fadcb86d558ab10 @aidanhs aidanhs committed Mar 12, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 JSON.sh
View
@@ -40,7 +40,7 @@ parse_array () {
done
;;
esac
- [[ $BRIEF -ne 1 ]] && value=`printf '[%s]' "$ary"`
+ [ $BRIEF -ne 1 ] && value=`printf '[%s]' "$ary"`
}
parse_object () {
@@ -83,7 +83,7 @@ parse_value () {
'{') parse_object "$jpath" ;;
'[') parse_array "$jpath" ;;
# At this point, the only valid single-character tokens are digits.
- ''|[^0-9]) throw "EXPECTED value GOT ${token:-EOF}" ;;
+ ''|[!0-9]) throw "EXPECTED value GOT ${token:-EOF}" ;;
*) value=$token ;;
esac
! ([ $BRIEF -eq 1 ] && ([ -z $jpath ] || [ $value = '""' ])) \

0 comments on commit 2caf844

Please sign in to comment.