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'"