On Friday 13 August 2010, 11:31:05 Marcus Meissner wrote:
e.g. for wine in OBS I have this simple script which pulls daily git snapshots, including detecting unchanged state and seperating local patches:
#!/bin/bash -x bsdir="/suse/meissner/projects/Emulators:Wine/wine-snapshot" snapdir=/suse/meissner/projects/snapshot-wine/ xdate=`date +%Y%m%d`
$bsdir/wine-$winever.$xdate.tar.bz2 # perhaps split into seperate
cd $bsdir cd $snapdir/wine git pull chars=`git diff '@{1 day ago}' | wc -c` if [ "$chars" == "0" ]; then echo "*** No git change found from yesterday, not rebuilding package." exit 0 fi rm $bsdir/wine-*.tar.bz2 winever=`cat VERSION|sed -e 's/Wine version //;s/1.2-/1.2./;'` git archive origin --prefix=wine-$winever.$xdate/ | bzip2 patches git diff origin..master > $bsdir/susepatches.patch cd $bsdir perl -pi -e "s/Version:.*/Version:$winever.$xdate/;" wine-snapshot.spec osc addremove osc ci -m "$xdate git checkout"
Cool script, Marcus. You might want to replace the perl -pi -e expression with sed -i, which has the same effect and should spare you a few milliseconds ;-). Cheers, Pete -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org