#!/bin/sh
schevoexec=`which schevo`
[ -x /etc/djangorc ] && . /etc/djangorc
evolvedb(){
#shift;

if [ -x ${schevoexec} ]; then 
 echo "Launching ${schevoexec} db evolve $@..."
 set -x
 $(${schevoexec} db evolve $@ || true)
 echo 'done.'
fi;
}

if [ $# != 4 ];
then
 echo "Usage: $0 --app appname durus://path/to/database.durus version"
else
 evolvedb $@;
fi; 
