X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 87985DC76D4 for ; Fri, 5 Jul 2013 04:21:55 +0000 (UTC) Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id E2361206EA for ; Fri, 5 Jul 2013 00:21:47 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute3.internal (MEProxy); Fri, 05 Jul 2013 00:21:47 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :in-reply-to:references; s=smtpout; bh=/ZdJMb89Y1a0T2Kq6M821rcQY QM=; b=hMq9PYzPti+E53W8YNvIntD46NRViQ3V61uM21AJstbUILekPI+00c4Zt 3pLdecyhTiRtVYxJx6C/Mk4LO83+zrBJOJXPw87Hyap49DGuqAoGoTOsqNqG9lPT rClNB/z9n2rd31SKSt0mWr8HZFgMGoVTPJcJWbhdQ2Mn945dFc= X-Sasl-enc: 68PbU9/H8A1vUYizdYYomN+RjqItL+n+xD5DNV6MnGUx 1372998107 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id B321C68027D for ; Fri, 5 Jul 2013 00:21:47 -0400 (EDT) From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH 14/31] abuild-sign: wrap cd in a subshell, use set -e Date: Fri, 5 Jul 2013 00:21:23 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- abuild-sign.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/abuild-sign.in b/abuild-sign.in index 777114a..6207aab 100644 --- a/abuild-sign.in +++ b/abuild-sign.in @@ -25,9 +25,11 @@ do_sign() { i=$(readlink -f $f) [ -d "$i" ] && i="$i/APKINDEX.tar.gz" repo="${i%/*}" - cd "$repo" || die "Failed to sign $i" + ( + set -e + cd "$repo" sig=".SIGN.RSA.$keyname" - openssl dgst -sha1 -sign "$privkey" -out "$sig" "$i" || die "Failed to sign $i" + openssl dgst -sha1 -sign "$privkey" -out "$sig" "$i" tmptargz=$(mktemp) tar -c "$sig" | abuild-tar --cut | gzip -9 > "$tmptargz" tmpsigned=$(mktemp) @@ -38,6 +40,7 @@ do_sign() { if [ -z "$quiet" ]; then echo "Signed $i" fi + ) || die "Failed to sign $i" done } -- 1.8.3.1 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---