From patchwork Mon Oct 15 09:17:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Zhongyi X-Patchwork-Id: 983996 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42YXty3rnGz9sBj for ; Mon, 15 Oct 2018 20:19:06 +1100 (AEDT) Received: from localhost ([::1]:51230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz1k-0003RD-4y for incoming@patchwork.ozlabs.org; Mon, 15 Oct 2018 05:19:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz0z-0003QC-8N for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBz0s-00008F-Is for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:16 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:47482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz0q-0008R6-Dw for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:09 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.19]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee95bc45b3f502-57bc6; Mon, 15 Oct 2018 17:17:52 +0800 (CST) X-RM-TRANSID: 2ee95bc45b3f502-57bc6 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.149]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea5bc45b37b82-744a7; Mon, 15 Oct 2018 17:17:52 +0800 (CST) X-RM-TRANSID: 2eea5bc45b37b82-744a7 From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Mon, 15 Oct 2018 17:17:34 +0800 Message-Id: <20181015091736.14997-1-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.81 Subject: [Qemu-devel] [PATCH v2 1/3] archive-source.sh: Modern shell scripting (use $() instead of ``) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, kraxel@redhat.com, Mao Zhongyi Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Thomas Huth --- 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 " 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'" From patchwork Mon Oct 15 09:17:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Zhongyi X-Patchwork-Id: 983997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42YXv03hw6z9s7W for ; Mon, 15 Oct 2018 20:19:08 +1100 (AEDT) Received: from localhost ([::1]:51231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz1m-0003SJ-4N for incoming@patchwork.ozlabs.org; Mon, 15 Oct 2018 05:19:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz0w-0003O3-Jk for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBz0t-00008r-Qy for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:14 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:20665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz0t-0008R9-6d for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:11 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.19]) by rmmx-syy-dmz-app07-12007 (RichMail) with SMTP id 2ee75bc45b3f142-56e4a; Mon, 15 Oct 2018 17:17:53 +0800 (CST) X-RM-TRANSID: 2ee75bc45b3f142-56e4a X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.149]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea5bc45b37b82-744ab; Mon, 15 Oct 2018 17:17:52 +0800 (CST) X-RM-TRANSID: 2eea5bc45b37b82-744ab From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Mon, 15 Oct 2018 17:17:35 +0800 Message-Id: <20181015091736.14997-2-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181015091736.14997-1-maozhongyi@cmss.chinamobile.com> References: <20181015091736.14997-1-maozhongyi@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.80 Subject: [Qemu-devel] [PATCH v2 2/3] git-submodule.sh: Modern shell scripting (use $() instead of ``) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, kraxel@redhat.com, Mao Zhongyi Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Thomas Huth --- scripts/git-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 807ca0b4f8..98ca0f2737 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -59,8 +59,8 @@ status) fi test -f "$substat" || exit 1 - CURSTATUS=`$GIT submodule status $modules` - OLDSTATUS=`cat $substat` + CURSTATUS=$($GIT submodule status $modules) + OLDSTATUS=$(cat $substat) test "$CURSTATUS" = "$OLDSTATUS" exit $? ;; From patchwork Mon Oct 15 09:17:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Zhongyi X-Patchwork-Id: 983998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42YXv22S7tz9s7W for ; Mon, 15 Oct 2018 20:19:10 +1100 (AEDT) Received: from localhost ([::1]:51232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz1n-0003TR-SJ for incoming@patchwork.ozlabs.org; Mon, 15 Oct 2018 05:19:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz10-0003QJ-K1 for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBz0q-00006t-Vq for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:18 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:35207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBz0m-0008RM-MD for qemu-devel@nongnu.org; Mon, 15 Oct 2018 05:18:07 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.19]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee65bc45b41d89-56fe0; Mon, 15 Oct 2018 17:17:53 +0800 (CST) X-RM-TRANSID: 2ee65bc45b41d89-56fe0 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.149]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea5bc45b37b82-744ad; Mon, 15 Oct 2018 17:17:53 +0800 (CST) X-RM-TRANSID: 2eea5bc45b37b82-744ad From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Mon, 15 Oct 2018 17:17:36 +0800 Message-Id: <20181015091736.14997-3-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181015091736.14997-1-maozhongyi@cmss.chinamobile.com> References: <20181015091736.14997-1-maozhongyi@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.80 Subject: [Qemu-devel] [PATCH v2 3/3] show-fixed-bugs.sh: Modern shell scripting (use $() instead of ``) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, kraxel@redhat.com, Mao Zhongyi Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Thomas Huth --- scripts/show-fixed-bugs.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/show-fixed-bugs.sh b/scripts/show-fixed-bugs.sh index 36f306898f..a095a4d6ba 100755 --- a/scripts/show-fixed-bugs.sh +++ b/scripts/show-fixed-bugs.sh @@ -23,10 +23,10 @@ while getopts "s:e:cbh" opt; do done if [ "x$start" = "x" ]; then - start=`git tag -l 'v[0-9]*\.[0-9]*\.0' | tail -n 2 | head -n 1` + start=$(git tag -l 'v[0-9]*\.[0-9]*\.0' | tail -n 2 | head -n 1) fi if [ "x$end" = "x" ]; then - end=`git tag -l 'v[0-9]*\.[0-9]*\.0' | tail -n 1` + end=$(git tag -l 'v[0-9]*\.[0-9]*\.0' | tail -n 1) fi if [ "x$start" = "x" ] || [ "x$end" = "x" ]; then @@ -38,9 +38,9 @@ fi echo "Searching git log for bugs in the range $start..$end" urlstr='https://bugs.launchpad.net/\(bugs\|qemu/+bug\)/' -bug_urls=`git log $start..$end \ +bug_urls=$(git log $start..$end \ | sed -n '\,'"$urlstr"', s,\(.*\)\('"$urlstr"'\)\([0-9]*\).*,\2\4,p' \ - | sort -u` + | sort -u) echo Found bug URLs: for i in $bug_urls ; do echo " $i" ; done @@ -68,7 +68,7 @@ elif [ "x$show_in_browser" = "x1" ]; then bugbrowser=xdg-open elif command -v gnome-open >/dev/null 2>&1; then bugbrowser=gnome-open - elif [ "`uname`" = "Darwin" ]; then + elif [ "$(uname)" = "Darwin" ]; then bugbrowser=open elif command -v sensible-browser >/dev/null 2>&1; then bugbrowser=sensible-browser