#!/bin/bash : ${DIALOG=dialog} : ${SVNBASE=http://devel.egressive.com/egressive/drupal_contrib/modules} norev=0 usage() { cat </dev/null` || tempfile=/tmp/test$$ trap "rm -f $tempfile" 0 1 2 5 15 $DIALOG --clear --title "Select Branch" \ --menu "Please select an appropriate branch for your drupal version\n" 0 0 0 \ $choices 2> $tempfile retval=$? choice=`cat $tempfile` case $retval in 0) echo "'$choice' chosen." ;; 1) echo "Cancel pressed." exit ;; 255) echo "ESC pressed." exit ;; esac mod_dir="${mod_dir}/${choice}" if [ -z "${revision}" ] then revision=`svn info ${mod_dir} | awk -F: '/^Last Changed Rev/{print $2}'` fi if [ $norev -eq 0 ] then revision_string="-r${revision}" fi modline="${module} ${revision_string} ${mod_dir}" externals=`(svn propget svn:externals . | sed -e "/^${module} /d" ; echo $modline) | sort` svn propset svn:externals "${externals}" . echo "Added ${modline} to svn:externals, run 'svn update'"