On Tue, Aug 09, 2011 at 10:53:44PM +0200, Lukas Fleischer wrote:
Local source files, as well as install and changelog files used to have separate version control checks. Move them into a single loop.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- commitpkg | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/commitpkg b/commitpkg index cfc2727..36d018b 100755 --- a/commitpkg +++ b/commitpkg @@ -77,17 +77,11 @@ case "$repo" in echo "Non-standard repository $repo in use, defaulting to server $server" ;; esac
-# check if all local source files are under version control -for s in ${source[@]}; do - if [[ $s != *://* ]] && svn status $s | grep -q '^\?'; then - abort "$s is not under version control" - fi -done - -# check if changelog and install files are under version control -for file in "$changelog" "$install"; do - if [[ -n ${file} ]] && svn status ${file} | grep -q '^\?'; then - abort "${file} is not under version control" +# check if all local source files, as well as changelog and install files are +# under version control +for i in ${source[@]} "$changelog" "$install"; do
Proper quoting here please: "${source[@]}"
+ if [[ -n $i && $i != *://* ]] && svn status $i | grep -q '^\?'; then
Same here: "$i"
+ abort "$i is not under version control" fi done
-- 1.7.6