qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shell scripting (


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shell scripting (use $() instead of ``)
Date: Mon, 15 Oct 2018 09:07:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-10-15 08:51, Mao Zhongyi wrote:
> 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.

FWIW, I think we do not have to worry about Solaris' /bin/sh here
anymore. Somebody tried to compile on Solaris a couple of weeks ago, and
found out that you need a proper POSIX-compliant shell for compiling
QEMU, so /bin/sh can not be used here anymore anyway.

> Signed-off-by: Mao Zhongyi <address@hidden>
> ---
>  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'"
> 

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]