Fix reference to mrball
[buildfarm-client.git] / run_cron.sh
1 #!/bin/sh
2
3 if which dirname >/dev/null; then
4   BFDIR=`dirname $0`
5 elif [ "x${BFDIR}" = "x" ]; then
6   echo "Cannot find BuildFarm client directory. Exiting."
7   exit 1
8 fi
9
10 cd $BFDIR
11 # Update the build client if new version available
12 if which git >/dev/null; then
13   git pull >/dev/null
14 fi
15
16 # Sanitize or set up environment
17 # 1) Remove because spec.txt generation fails if set
18 if env | grep -q '/bin/bash'; then
19   export -n PERL_UNICODE
20 else
21   unset PERL_UNICODE
22 fi
23
24 ./run_branches.pl $@