summaryrefslogtreecommitdiff
path: root/commitpkg
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-03-11 21:18:24 +0100
committerJan Steffens <jan.steffens@gmail.com>2011-03-18 11:28:45 +0100
commit80168e7e1c55f16cabcccc23450f64a55c338ede (patch)
tree05497008664cd5e872170781596a62c4833b4d6a /commitpkg
parentf72297a639cda567107f83c1da4eafa2de604d9f (diff)
downloaddevtools-80168e7e1c55f16cabcccc23450f64a55c338ede.tar.xz
Abort properly if source files are not under version control (FS#23122).
Remove superfluous subshell code from version control checks in commitpkg, making it exit properly if source files are not under version control. Also, improve correctness of sed(1) commands and use fgrep(1) instead of grep(1) where appropriate. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'commitpkg')
-rwxr-xr-xcommitpkg14
1 files changed, 7 insertions, 7 deletions
diff --git a/commitpkg b/commitpkg
index ab57a61..f50c607 100755
--- a/commitpkg
+++ b/commitpkg
@@ -72,23 +72,23 @@ else
fi
# check if all local source files are under version control
-(for s in ${source[@]}; do
- echo $s | grep -vq '://' && \
- svn status $s | grep -q '?' && \
+for s in ${source[@]}; do
+ echo $s | grep -Fvq '://' && \
+ svn status $s | grep -q '^\?' && \
abort "$s is not under version control"
-done) || true
+done
# check if changelog and install files are under version control
-(for i in 'changelog' 'install'; do
+for i in 'changelog' 'install'; do
filelist=$(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD)
for file in $filelist; do
# evaluate any bash variables used
eval file=${file}
- if svn status ${file} | grep -q '?'; then
+ if svn status ${file} | grep -q '^\?'; then
abort "${file} is not under version control"
fi
done
-done) || true
+done
# see if any limit options were passed, we'll send them to rsync
unset rsyncopts