/ Published in: Bash
> <code>__Usage:__
> ./svn-export.sh [repository/subdir] [rev1] [rev2]</code>
> ./svn-export.sh [repository/subdir] [rev1] [rev2]</code>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash if test ! $1; then echo "Missing required arguments: repo path, rev1, rev2" exit 0 fi DOMAIN='http://your.svnrepository.com' REPO=$1 REV1=$2 REV2=$3 for i in $(svn diff --summarize -r $REV1:$REV2 $DOMAIN$REPO | awk '{ print $2 }'); do p=$(echo $i | sed -e "s{$DOMAIN$REPO/{{"); mkdir -p $(dirname $p); svn export $i $p; done