#! /bin/sh REPOS="$1" DUMP="$2" OWNER="$3" if [ -z "$REPOS" ] || [ -z "$DUMP" ]; then echo "Usage: $0 repository dump-prefix [repository-owner]" >&2 exit 1 fi if [ -n "$OWNER" ]; then SVNADMIN="sudo -u $OWNER svnadmin" SVNLOOK="sudo -u $OWNER svnlook" else SVNADMIN=svnadmin SVNLOOK=svnlook fi REV=`$SVNLOOK youngest "$REPOS"` if [ "`expr "$REV" : '[0-9]\+'`" -eq 0 ]; then echo "$0: svnlook youngest failed" >&2 exit 1 fi $SVNADMIN dump "$REPOS" 0 "$REV" > "$DUMP.$REV" exit 0