adding all of botlist, initial add
[botlist.git] / botlistprojects / botbert / bin / bot_email_job.sh
blob96ece272412856e98e4e650bb19f6ad0012d4a97
1 #!/bin/sh
3 # Depending on if we are running from pwd or not, determine
4 # proper location to change directory to.
5 case $0 in
6 /*)
7 ABS_APP_PATH=$0
8 ABS_CONF=`dirname $ABS_APP_PATH`
9 ABS_CONF=`dirname $ABS_CONF`
10 ;;
11 *)
12 ABS_APP_PATH=`pwd`
13 ABS_CONF=`dirname $ABS_APP_PATH`
14 ;;
15 esac
17 BOTBERT_HOME=$ABS_CONF
18 TOPDIR=$BOTBERT_HOME
19 DIR_PROPERTIES=$BOTBERT_HOME
21 if [ $(uname -s | grep -c CYGWIN) -gt 0 ]; then
22 echo "WARN: running in CYGWIN environment"
23 DIR_PROPERTIES=`cygpath -wp $BOTBERT_HOME`
26 cd $BOTBERT_HOME
28 APP_MAIN=${BOTBERT_HOME}/lib/python/job_email_popular.py
29 echo "running in directory=${BOTBERT_HOME}"
30 echo "-----------------------"
32 python $APP_MAIN $@ &
34 # Write the process id
35 echo $! > $BOTBERT_HOME/bin/botemail.pid
37 # End of Script --