[Rear-users] SF.net SVN: rear:[754] trunk/usr/share/rear/contrib/svn2obs

schlomoschapiro at users.sourceforge.net schlomoschapiro at users.sourceforge.net
Thu Jan 26 20:46:12 CET 2012


Revision: 754
          http://rear.svn.sourceforge.net/rear/?rev=754&view=rev
Author:   schlomoschapiro
Date:     2012-01-26 19:46:11 +0000 (Thu, 26 Jan 2012)
Log Message:
-----------
bugfix and more documentation

Modified Paths:
--------------
    trunk/usr/share/rear/contrib/svn2obs

Modified: trunk/usr/share/rear/contrib/svn2obs
===================================================================
--- trunk/usr/share/rear/contrib/svn2obs	2012-01-18 13:53:47 UTC (rev 753)
+++ trunk/usr/share/rear/contrib/svn2obs	2012-01-26 19:46:11 UTC (rev 754)
@@ -1,7 +1,21 @@
 #!/bin/bash
 #
 # update OBS from SVN
+# 
+# License: GPL
+#
+# Author: Schlomo Schapiro <rear at schlomo.schapiro.org>
+#
+# Note: If osc dies with an error about password make sure that osc can actually use your stored password.
+#       In my case this was working from my login shell and not working from CRON and the reason
+#       was that when running from CRON osc could not use my password that was stored in the GNOME keyring.
+#       After disabling keyring/kwallet integration in ~/.oscrc I worked again.
 
+# debug help
+#declare -p
+#set -x -- force
+#pwd
+
 SVN=https://rear.svn.sourceforge.net/svnroot/rear/trunk
 
 # read revision
@@ -10,9 +24,7 @@
 # read OSB 
 IFS=":. " read j1 j2 j3 OBSREV < <(osc cat home:sschapiro rear-snapshot rear-snapshot.spec | grep Version)
 
-if test "$REV" = "$OBSREV" ; then
-	echo "ReaR revision in SVN and OBS match already ($REV)"
-else
+if [[ "$REV" != "$OBSREV" || ( "$1" && "$1" = force ) ]] ; then
 	echo "SVN revision is $REV, OBS revision is $OBSREV, building in OBS"
 	BUILD_DIR=/tmp/rear.$$
 	trap "rm -rf $BUILD_DIR" 0
@@ -28,4 +40,6 @@
 	sed -i -e "/^Version:/s/^Version.*$/Version: 0.0.$REV/" rear-snapshot/rear-snapshot.dsc rear-snapshot/rear-snapshot.spec rear-snapshot/debian.control
 	sed -i -e "/rear-snapshot/s/0.0.[0-9]*/0.0.$REV/g" rear-snapshot/debian.changelog
 	osc ci -m "SVN -> OBS rev $REV" rear-snapshot
+else
+	echo "ReaR revision in SVN and OBS match already ($REV)"
 fi

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rear-users mailing list