libproxy/update-from-svn.sh
Dominique Leuenberger f8e8abf7a0 Accepting request 46522 from home:dimstar:branches:GNOME:Factory
Copy from home:dimstar:branches:GNOME:Factory/libproxy via accept of submit request 46522 revision 3.
Request was accepted with message:
Forwarding to openSUSE:Factory

OBS-URL: https://build.opensuse.org/request/show/46522
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libproxy?expand=0&rev=51
2010-08-27 22:58:31 +00:00

29 lines
743 B
Bash

#!/bin/sh
MODULE=$(basename $(pwd))
if [ ! -x /usr/bin/svn ]; then
echo "subversion is missing - aborting"
return 1
fi
if [ ! -d $MODULE ]; then
echo "Base directory of $MODULE checkout is missing - aborting"
exit 2
fi
pushd $MODULE
svn update
VERSION=$(grep "version" $MODULE/CMakeLists.txt | awk -F'(' '{print $2}' | awk '{print $1+0"."$2+0"."$3+0}')
SVNREV=$(svn info | awk '/Revision:/ { print $2 }')
popd
# Adjust the version information and svn rev in the spec file to what we get from the svn checkout.
sed -i "s/Version:.*/Version: ${VERSION}.svn.$SVNREV/" $MODULE.spec
tar cjf $MODULE.tar.bz2 $MODULE
[ -f pre_checkin.sh ] && sh pre_checkin.sh
osc ci -m "Update to ${VERSION/git/svn.$SVNREV}" --skip-validation