Simplify variable to 1 line 73/52773/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 3 Mar 2017 16:33:10 +0000 (11:33 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 3 Mar 2017 16:33:12 +0000 (11:33 -0500)
We can achieve the same result with a 1 liner vs the 4 lines it was.

Change-Id: I42a0436912bf56afc70884f88dac059b54ae5eb0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
scripts/check-unicode.sh

index cb0af7215361776612e8cc117f34cb0491c3322f..ab20a3ec3a640d77d4f1ee60940b2730d2463143 100755 (executable)
 #   Thanh Ha (The Linux Foundation) - Initial implementation
 ##############################################################################
 
-directory="."
-if [ ! -z "$1" ]; then
-    directory="$1"
-fi
+directory=${1:-"."}
 
 echo "Scanning $directory"
 while IFS= read -r -d '' x