## # functions.so - source this from scripts ## result=0 if [ -z "$JENKINS" ]; then export JENKINS=http://exiv2.dyndns.org:8080; fi if [ -z "$DAILY" ]; then export DAILY=userContent/builds/Daily ; fi ## # osName - print 'macosx' or 'cygwin' or 'mingw' or 'linux' osName () { if [ $(uname) == Darwin ]; then echo macosx elif [ $(uname -o) == Cygwin ]; then echo cygwin elif [ $(uname -o) == Msys ]; then echo mingw else echo linux fi } ## # which PLATFORM # PLATFORM must be defined as msvc or ming when called from ssh if [ "$PLATFORM" == "" ]; then export PLATFORM=$(echo osName) if ( "$PLATFORM" == "cygwin" ]; then # tweak path to ensure the correct version of perl and expr for autotools export "PATH=/bin:$PATH" fi fi ## # functions thepath () { if [ -d $1 ]; then ( cd $1; pwd ); else ( cd $(dirname $1); echo $(pwd)/$(basename $1) ); fi } # That's all Folks! ##