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 -maxdepth 1 -type f \! -name "upgrade_*" \! -name ".*" -exec git mv {} $NEW_VERSION \;