qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shell scripting (use $() instead of ``)
@ 2018-10-15  6:51 Mao Zhongyi
  2018-10-15  6:51 ` [Qemu-devel] [PATCH 2/3] git-submodule.sh: " Mao Zhongyi
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Mao Zhongyi @ 2018-10-15  6:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, kraxel, Mao Zhongyi

Various shell files contain a mix between obsolete `` and
modern $(); use of `` is only required when using /bin/sh
on Solaris. It would be nice to convert to using $()
everywhere, or at least in all bash scripts, as well as in
all scripts that are known to not be run on Solaris.

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 scripts/archive-source.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 4e63774f9a..62bd22578b 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -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'"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-10-17  1:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-15  6:51 [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shell scripting (use $() instead of ``) Mao Zhongyi
2018-10-15  6:51 ` [Qemu-devel] [PATCH 2/3] git-submodule.sh: " Mao Zhongyi
2018-10-15  7:09   ` Thomas Huth
2018-10-15  6:51 ` [Qemu-devel] [PATCH 3/3] show-fixed-bugs.sh: " Mao Zhongyi
2018-10-15  7:12   ` Thomas Huth
2018-10-15  7:07 ` [Qemu-devel] [PATCH 1/3] archive-source.sh: " Thomas Huth
2018-10-15  7:31   ` [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shellscripting " maozy
2018-10-15  8:05   ` [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shell scripting " Markus Armbruster
2018-10-15 15:44 ` Eric Blake
2018-10-17  1:52   ` [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shellscripting " maozy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).