Created
November 27, 2009 14:12
-
-
Save jesperronn/244033 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DEST=/svnroot/dk_es_virkdk | |
SRC_URL=https://cs-blade1.common.capgemini.dk:8443/svn/virk.dk | |
SRC_USER=jronn | |
SRC_PASS=abcd1234 | |
DST_USER=svnsync | |
#svnsync initialize --source-username jronn --source-password abcd1234 file:///Users/jesper/src/v2 https://cs-blade1.common.capgemini.dk:8443/svn/virk.dk | |
rm -rf $DEST && svnadmin create $DEST | |
cat <<'EOF' > $DEST/hooks/pre-revprop-change | |
#!/bin/sh | |
USER="$3" | |
if [ "$USER" = "svnsync" ]; then exit 0; fi | |
echo "Only the svnsync user can change revprops" >&2 | |
exit 1 | |
EOF | |
chmod +x $DEST/hooks/pre-revprop-change | |
cd $DEST | |
D=`pwd -P` | |
svnsync initialize --source-username $SRC_USER --source-password $SRC_PASS \ | |
--sync-username $DST_USER file://$D \ | |
$SRC_URL | |
echo "done" | |
echo "Now run the following command" | |
echo | |
echo "svnsync sync file://$D" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment