[arch-projects] [devtools] [PATCH 2/3] commitpkg: Merge version control checks

Lukas Fleischer archlinux at cryptocrack.de
Tue Aug 9 17:28:38 EDT 2011


On Tue, Aug 09, 2011 at 05:03:08PM -0400, Dave Reisner wrote:
> 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 at 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[@]}"

Hm, I just copy-pasted that from our current code. You're obviously
right though. Will fix that.

> 
> > +	if [[ -n $i && $i != *://* ]] && svn status $i | grep -q '^\?'; then
> 
> Same here: "$i"

Same here :)

> 
> > +		abort "$i is not under version control"
> >  	fi
> >  done
> >  
> > -- 
> > 1.7.6
> > 


More information about the arch-projects mailing list