I'm wondering if there's a better way of identifying which of the DIRS I should use and only update that one.
svnlook dirs-changed
é o que você re procurando:
# svnlook dirs-changed -r 40270 /path/to/the/repo
project1/foo/bar
Tente algo assim:
#!/usr/local/bash4/bin/bash
typeset -A IP
typeset -A DOCROOT
PROJECTS="project1 project2"
IP=([project1]="ip1" [project2]="ip2")
DOCROOT=([project1]="/var/www/html/project1/" [project2]="/var/www/html/project2/")
REPO="$1"
REV="$2"
USER='deployer'
PROJECT='svnlook dirs-changed -r "$REV" "$REPO" | awk -F "/" '{ print $1 }''
ssh -t "$USER@${IP[$PROJECT]}" "cd ${DOCROOT[$PROJECT]} && svn up"