Skip to content

Commit

Permalink
Change variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
mclarkson committed Mar 26, 2013
1 parent 72a71ad commit 21cb27e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions JSON.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ throw () {

BRIEF=0
LEAFONLY=0
PRUNEMPTY=0
PRUNE=0

usage() {
echo
Expand All @@ -29,11 +29,11 @@ parse_options() {
;;
-b) BRIEF=1
LEAFONLY=1
PRUNEMPTY=1
PRUNE=1
;;
-l) LEAFONLY=1
;;
-p) PRUNEMPTY=1
-p) PRUNE=1
;;
?*) echo "ERROR: Unknown option."
usage
Expand Down Expand Up @@ -132,11 +132,11 @@ parse_value () {
;;
esac
[ "$value" == '' ] && return
[ "$LEAFONLY" -eq 0 ] && [ "$PRUNEMPTY" -eq 0 ] && print=1
[ "$LEAFONLY" -eq 1 ] && [ "$isleaf" -eq 1 ] && [ $PRUNEMPTY -eq 0 ] && print=1
[ "$LEAFONLY" -eq 0 ] && [ "$PRUNEMPTY" -eq 1 ] && [ "$isempty" -eq 0 ] && print=1
[ "$LEAFONLY" -eq 0 ] && [ "$PRUNE" -eq 0 ] && print=1
[ "$LEAFONLY" -eq 1 ] && [ "$isleaf" -eq 1 ] && [ $PRUNE -eq 0 ] && print=1
[ "$LEAFONLY" -eq 0 ] && [ "$PRUNE" -eq 1 ] && [ "$isempty" -eq 0 ] && print=1
[ "$LEAFONLY" -eq 1 ] && [ "$isleaf" -eq 1 ] && \
[ $PRUNEMPTY -eq 1 ] && [ $isempty -eq 0 ] && print=1
[ $PRUNE -eq 1 ] && [ $isempty -eq 0 ] && print=1
[ "$print" -eq 1 ] && printf "[%s]\t%s\n" "$jpath" "$value"
:
}
Expand Down

0 comments on commit 21cb27e

Please sign in to comment.