1
0
obs-service-format_spec_file/format_spec_file
Stephan Kulow 0d8a50984a Accepting request 95751 from openSUSE:Tools
- move pkgconfig() and co to the end of the buildrequires

- another update from git to replace way more licenses (0.4)

- update from https://github.com/openSUSE/obs-service-format_spec_file

- allow to specify a defined spec file (version 0.2)

OBS-URL: https://build.opensuse.org/request/show/95751
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-format_spec_file?expand=0&rev=14
2011-12-12 15:58:11 +00:00

41 lines
769 B
Bash

#!/bin/bash
# just a wrapper for the perl script.
while test $# -gt 0; do
case $1 in
*-outdir)
MYOUTDIR="$2"
shift
;;
*-specfile)
MYSPECFILES="$MYSPECFILES $2"
shift
;;
*)
echo Unknown parameter $1.
echo 'Usage: this service is not excepting parameters'
exit 1
;;
esac
shift
done
RETURN=0
if [ -z "$MYSPECFILES" ]; then
MYSPECFILES=`echo *.spec`
fi
for i in $MYSPECFILES; do
if [ "$i" == '*.spec' ]; then
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"
done
exit $RETURN