Loading util/openssl-format-source +21 −5 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ VERBOSE=false DONT=false STOPARGS=false COMMENTS=false CHANGED=false DEBUG="" # for this exercise, we want to force the openssl style, so we roll Loading Loading @@ -82,10 +83,6 @@ do fi fi if [ "$VERBOSE" = "true" ]; then echo "$j" fi if [ "$DONT" = "false" ]; then tmp=$(mktemp /tmp/indent.XXXXXX) trap 'rm -f "$tmp"' HUP INT TERM EXIT Loading Loading @@ -138,7 +135,18 @@ do else expand "$j" | indent $INDENT_ARGS > "$tmp" fi; if cmp -s "$tmp" "$j"; then if [ "$VERBOSE" = "true" ]; then echo "$j unchanged" fi rm "$tmp" else if [ "$VERBOSE" = "true" ]; then echo "$j changed" fi CHANGED=true mv "$tmp" "$j" fi ;; esac fi Loading @@ -146,3 +154,11 @@ do done if [ "$VERBOSE" = "true" ]; then echo if [ "$CHANGED" = "true" ]; then echo "SOURCE WAS MODIFIED" else echo "SOURCE WAS NOT MODIFIED" fi fi Loading
util/openssl-format-source +21 −5 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ VERBOSE=false DONT=false STOPARGS=false COMMENTS=false CHANGED=false DEBUG="" # for this exercise, we want to force the openssl style, so we roll Loading Loading @@ -82,10 +83,6 @@ do fi fi if [ "$VERBOSE" = "true" ]; then echo "$j" fi if [ "$DONT" = "false" ]; then tmp=$(mktemp /tmp/indent.XXXXXX) trap 'rm -f "$tmp"' HUP INT TERM EXIT Loading Loading @@ -138,7 +135,18 @@ do else expand "$j" | indent $INDENT_ARGS > "$tmp" fi; if cmp -s "$tmp" "$j"; then if [ "$VERBOSE" = "true" ]; then echo "$j unchanged" fi rm "$tmp" else if [ "$VERBOSE" = "true" ]; then echo "$j changed" fi CHANGED=true mv "$tmp" "$j" fi ;; esac fi Loading @@ -146,3 +154,11 @@ do done if [ "$VERBOSE" = "true" ]; then echo if [ "$CHANGED" = "true" ]; then echo "SOURCE WAS MODIFIED" else echo "SOURCE WAS NOT MODIFIED" fi fi