Create a gist now

Instantly share code, notes, and snippets.

Embed
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