handl OUTDIR=/space/openSUSE:Tools/obs-service-format_spec_file

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-format_spec_file?expand=0&rev=50
This commit is contained in:
Adrian Schröter 2012-02-04 09:36:01 +00:00 committed by Git OBS Bridge
parent b81ba4e4db
commit 01497a0d28
2 changed files with 17 additions and 3 deletions

View File

@ -31,9 +31,18 @@ for i in $MYSPECFILES; do
echo "WARNING: no spec file found"
exit 0
fi
/usr/lib/obs/service/format_spec_file.files/prepare_spec "$i" > "$MYOUTDIR/$i" || RETURN=1
# remove all file files which are indendical to committed files
cmp -s "$i" "$MYOUTDIR/$i" && rm "$MYOUTDIR/$i"
if /usr/lib/obs/service/format_spec_file.files/prepare_spec "$i" > "$MYOUTDIR/$i.$$"; then
# remove all file files which are indendical to committed files
# be carefull for the case that $MYOUDIR is local dir
if cmp -s "$i" "$MYOUTDIR/$i.$$"; then
rm "$MYOUTDIR/$i.$$"
else
mv "$MYOUTDIR/$i.$$" "$MYOUTDIR/$i"
fi
else
rm "$MYOUTDIR/$i.$$"
RETURN=1
fi
done
exit $RETURN

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Feb 4 09:35:13 UTC 2012 - adrian@suse.de
- handle failing prepare_spec when $OUTDIR=$PWD correct
-------------------------------------------------------------------
Fri Feb 3 09:23:51 UTC 2012 - coolo@suse.com