diff options
author | Dubiousjim <dubiousjim@gmail.com> | 2013-07-05 00:21:33 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-09 07:11:14 +0000 |
commit | e6313b54a44b04982dfda19c73aa1194ef28911b (patch) | |
tree | 418d0e9bbb0d3749413212173c9b5af8fa2f08cc /apkgrel.in | |
parent | 9a740d05aab3c8e92e2315d2d3210e3306202665 (diff) | |
download | abuild-e6313b54a44b04982dfda19c73aa1194ef28911b.tar.gz abuild-e6313b54a44b04982dfda19c73aa1194ef28911b.tar.bz2 abuild-e6313b54a44b04982dfda19c73aa1194ef28911b.tar.xz abuild-e6313b54a44b04982dfda19c73aa1194ef28911b.zip |
apkgrel: --clean-git enhancements
Diffstat (limited to 'apkgrel.in')
-rw-r--r-- | apkgrel.in | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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;; |