Skip to content

Instantly share code, notes, and snippets.

@mjangda
Created June 17, 2014 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjangda/1e0dee66595d150ca3c6 to your computer and use it in GitHub Desktop.
Save mjangda/1e0dee66595d150ca3c6 to your computer and use it in GitHub Desktop.
diff --git a/tools/checkstyle.sh b/tools/checkstyle.sh
index 8f536e2..e206727 100755
--- a/tools/checkstyle.sh
+++ b/tools/checkstyle.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-if [ x"$1" == x ]; then
+if [ -z "$1" ]; then
checkstyle -c cq-configs/checkstyle/checkstyle.xml -r src/
else
checkstyle -c cq-configs/checkstyle/checkstyle.xml $@
-fi
\ No newline at end of file
+fi
diff --git a/tools/compare-with-develop-style.sh b/tools/compare-with-develop-style.sh
index 02fafeb..512732b 100755
--- a/tools/compare-with-develop-style.sh
+++ b/tools/compare-with-develop-style.sh
@@ -3,7 +3,7 @@
CONFIG_FILE=cq-configs/checkstyle/checkstyle.xml
cp $CONFIG_FILE /tmp/checkstyle.xml
-if [ x"$1" == x ]; then
+if [ -z "$1" ]; then
compared_branch=develop
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment