]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Applying shellcheck to bin/xtract-xlate-msgs.sh
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 6 Nov 2019 16:39:59 +0000 (17:39 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 6 Nov 2019 16:39:59 +0000 (17:39 +0100)
bin/xtract-xlate-msgs.sh

index 38630e00ed283e1559892620f24e0e44df1709c1..bfaa08f647ad33585161b36d627571447d599070 100755 (executable)
@@ -6,8 +6,8 @@ set -u
 this_script=$( readlink -f "$0" )
 cur_dir=$( pwd )
 
-base_dir=$( dirname $( dirname "${this_script}" ) )
-cd ${base_dir}
+base_dir=$( dirname "$( dirname "${this_script}" )" )
+cd "${base_dir}"
 
 locale_dir=locale
 locale_domain="create_terraform"
@@ -20,8 +20,7 @@ if [[ ! -d "lib" ]] ; then
     exit 3
 fi
 
-pkg_version=$( cat lib/cr_tf/__init__.py | \
-                    grep '^[   ]*__version__' | \
+pkg_version=$( grep '^[        ]*__version__' lib/cr_tf/__init__.py | \
                     sed -e 's/[        ]*//g' | \
                     awk -F= '{print $2}' | \
                     sed -e "s/^'//" -e "s/'\$//" )