From b1be28471616cb0d43e0b9f25b352c59f9af09d1 Mon Sep 17 00:00:00 2001 From: Claus-Justus Heine <Claus-Justus.Heine@IANS.Uni-Stuttgart.DE> Date: Thu, 29 Apr 2010 10:09:22 +0000 Subject: [PATCH] Relocate script. --- svn-switch.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 svn-switch.sh diff --git a/svn-switch.sh b/svn-switch.sh new file mode 100644 index 0000000..35bbc2f --- /dev/null +++ b/svn-switch.sh @@ -0,0 +1,39 @@ +#! /bin/sh + + +if test $# -ne 1; then + +cat <<EOF + +A script to "reparent" the working-copy of the ALBERTA package by +calling "svn switch" on all directories referred to by "svn:externals" +properties. + +Calling convention: + +$0 NEW_URL + +Note: the old repository URL is determined using "svn info". +EOF +exit 1 +fi + +set -x + +OLD_URL=`svn info .|fgrep URL |awk '{ print $2 }'` +NEW_URL="$1" + +if test "${OLD_URL}" = "${NEW_URL}"; then + Working copy already pointing to new URI. + exit 1 +fi + +svn switch --relocate "${OLD_URL}" "${NEW_URL}"/albertadist + +OLD_URL=`echo "${OLD_URL}"|sed 's/albertadist//g'` + +for i in alberta alberta_util demo add_ons gnu-compat doc; do + cd $i + svn switch --relocate "${OLD_URL}"/"$i" "${NEW_URL}"/"$i" + cd .. +done -- GitLab