LOCALVER=`/usr/local/bin/svnlook youngest /home/svn/livejournal`
REMOTEVER=`/usr/bin/ssh jacques@hostname /usr/local/bin/svnlook youngest /home/svn/livejournal`
echo "Local version is ${LOCALVER}"
echo "Remote version is ${REMOTEVER}"
if [ "$REMOTEVER" -gt "$LOCALVER" ];
then
echo "Remote version is greater than local version"
START=$(echo "${LOCALVER} + 1" | /usr/bin/bc -l)
/usr/bin/ssh jacques@hostname /usr/local/bin/svnadmin dump --incremental --deltas --revision ${START}:${REMOTEVER} /path/to/repo | /usr/local/bin/svnadmin load --ignore-uuid /path/to/repo
else
echo "Both local and remote version have the same data"
fi