4 if [ ! $TARGET_DIR ]; then
8 if [[ ! -d $TARGET_DIR ]]; then
9 echo "No such directory $TARGET_DIR"
15 CURRENT_VERSION=`ls | sort -n | tail -n1`
17 if [ ! $CURRENT_VERSION ]; then
18 echo "no previous schema found to upgrade from"
22 ((NEW_VERSION=$CURRENT_VERSION + 1))
26 find $CURRENT_VERSION -depth 1 \! -name "upgrade_*" \! -name ".*" -exec svn mv {} $NEW_VERSION \;
27 svn cp ${CURRENT_VERSION}/upgrade_999_version.sql $NEW_VERSION