archive-source.sh: Modern shell scripting (use $() instead of ``)
authorMao Zhongyi <maozhongyi@cmss.chinamobile.com>
Mon, 15 Oct 2018 09:17:34 +0000 (17:17 +0800)
committerThomas Huth <thuth@redhat.com>
Tue, 16 Oct 2018 16:34:19 +0000 (18:34 +0200)
Various shell files contain a mix between obsolete ``
and modern $(); It would be nice to convert to using $()
everywhere.

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
scripts/archive-source.sh

index 4e63774f9ab483ba7df9e9fa50b4ac7c17805123..62bd22578b2707288648a937af31be011976e569 100755 (executable)
@@ -18,7 +18,7 @@ if test $# -lt 1; then
     error "Usage: $0 <output tarball>"
 fi
 
-tar_file=`realpath "$1"`
+tar_file=$(realpath "$1")
 list_file="${tar_file}.list"
 vroot_dir="${tar_file}.vroot"
 
@@ -34,7 +34,7 @@ if git diff-index --quiet HEAD -- &>/dev/null
 then
     HEAD=HEAD
 else
-    HEAD=`git stash create`
+    HEAD=$(git stash create)
 fi
 git clone --shared . "$vroot_dir"
 test $? -ne 0 && error "failed to clone into '$vroot_dir'"