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 + if [[ -n $i && $i != *://* ]] && svn status $i | grep -q '^\?'; then + abort "$i is not under version control" fi done -- 1.7.6