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 96E35DC7B4D for ; Fri, 5 Jul 2013 04:21:55 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 48DBE2080A for ; Fri, 5 Jul 2013 00:21:52 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 05 Jul 2013 00:21:52 -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=TcOZMCSlG6UXvfQIXJxNj0v0G 7s=; b=Jn8ib0q65XLKsp7TAwnuXomzjSpJ1S1KfcWv5/0YYW6xEXBN7Uy/krlBu dGs/rUUUXSpd6R2iZ0XhWuxHUMww87dIQRPkgtk/D7IkthcFBq0o9ySxRiixcig9 JwRIdU6iPnwoi3xdsavjG526LyVSSAnqN3dyoLOM6DOc8AT5iw= X-Sasl-enc: jsThRtfTj9yFdA0aaN9nA29UJYWn3yuT59nYcX88F3uS 1372998112 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id 0AEFD680204 for ; Fri, 5 Jul 2013 00:21:52 -0400 (EDT) From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH 24/31] apkgrel: --clean-git enhancements Date: Fri, 5 Jul 2013 00:21:33 -0400 Message-Id: <11afcb35e9739d69aa98a1e3eaa37804af468eb4.1372997335.git.dubiousjim@gmail.com> 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: --- apkgrel.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apkgrel.in b/apkgrel.in index 57b3b93..28978e3 100644 --- a/apkgrel.in +++ b/apkgrel.in @@ -62,7 +62,7 @@ Usage: $prog [-z|--zero] [-a|--add] [-g|--clean-git] [-s|--set NUM] [-t|--test] Options: -z, --zero Set pkgrel to 0 -a, --add Add 1 to current pkgrel - -g, --clean-git Only operate on APKBUILDs with clean git status + -g, --clean-git Only operate on APKBUILDs with clean git status (implies --add) -s, --set NUM Set pkgrel to NUM -t, --test Only verify that files have a valid pkgrel -f, --force Operate on files without a valid pkgrel @@ -86,7 +86,10 @@ while true; do case $1 in -z|--zero) setto=0; cmd=do_set;; -a|--add) cmd=do_add;; - -g|--clean-git) only_clean_git=1;; + -g|--clean-git) # verify that we're in a git tree + git rev-parse 2>/dev/null || die "not in a git tree" + cmd=do_add + only_clean_git=1;; -s|--set) setto=$2; shift; cmd=do_set;; -t|--test) cmd=do_nothing;; -f|--force) force=1;; -- 1.8.3.1 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---