[Fai-commit] r6525 - branches/stable/3.4/lib
Michael Prokop
mika at alioth.debian.org
Mon May 9 16:04:59 UTC 2011
Author: mika
Date: 2011-05-09 16:04:58 +0000 (Mon, 09 May 2011)
New Revision: 6525
Modified:
branches/stable/3.4/lib/get-config-dir-svn
Log:
get-config-dir-svn: Fix broken-pipe error in SVN URL check
(cherry picked from commit e43119d50cb223329523c5202d2959e2336b5f7c)
Conflicts:
3.4/lib/get-config-dir-svn
From: Michael Prokop <mika at grml.org>
Modified: branches/stable/3.4/lib/get-config-dir-svn
===================================================================
--- branches/stable/3.4/lib/get-config-dir-svn 2011-05-05 07:19:51 UTC (rev 6524)
+++ branches/stable/3.4/lib/get-config-dir-svn 2011-05-09 16:04:58 UTC (rev 6525)
@@ -51,10 +51,16 @@
[ -n "$username" ] && user="--username $username"
if [ -d "$FAI/.svn" ] ; then
- echo "Updating SVN in $FAI"
- cd $FAI
- svn up $user $pass | grep -v 'Updated to revision' > $LOGDIR/getconf.log
- task_error 701 ${PIPESTATUS[0]}
+ if [ `svn info $FAI | grep '^URL:' | egrep -o '://.+'` == "://$svnpath" ]; then
+ echo "Updating SVN in $FAI"
+ cd $FAI
+ svn up $user $pass | grep -v 'Updated to revision' > $LOGDIR/getconf.log
+ task_error 701 ${PIPESTATUS[0]}
+ else
+ echo "$FAI already contains a svn repository, but it is not from $svnurl!" >&2
+ echo "Please delete $FAI manually. Fatal error." >&2
+ task_error 703
+ fi
else
echo "Checking out SVN"
svn co $user $pass $svnurl $FAI | grep -v 'Checked out revision' > $LOGDIR/getconf.log
More information about the Fai-commit
mailing list