Commit a2c609c5 authored by Jens Korinth's avatar Jens Korinth
Browse files

Fix setup.sh bug on systems with no realpath program

parent 9752d87c
if [ -n "$BASH_VERSION" ]; then
command -v xargs > /dev/null || { echo >&2 "ERROR: xargs program not available."; }
if [ "`uname`" = "Darwin" ]; then
export TAPASCO_HOME=`dirname ${BASH_SOURCE[0]} | xargs cd | pwd`
else
export TAPASCO_HOME=`dirname ${BASH_SOURCE[0]} | xargs realpath`
command -v realpath > /dev/null || command -v readlink > /dev/null || { echo "ERROR: neither realpath nor readlink programs are available."; }
command -v xargs > /dev/null && command -v realpath > /dev/null && export TAPASCO_HOME=`dirname ${BASH_SOURCE[0]} | xargs realpath`
command -v xargs > /dev/null && command -v readlink > /dev/null && export TAPASCO_HOME=`dirname ${BASH_SOURCE[0]} | xargs readlink -f`
fi
elif [ -n "$ZSH_VERSION" ]; then
export TAPASCO_HOME=`dirname ${(%):-%x} | xargs realpath`
command -v realpath > /dev/null || command -v readlink > /dev/null || { echo "ERROR: neither realpath nor readlink programs are available."; }
command -v xargs > /dev/null && command -v realpath > /dev/null && export TAPASCO_HOME=`dirname ${(%):-%x} | xargs realpath`
command -v xargs > /dev/null && command -v readlink > /dev/null && export TAPASCO_HOME=`dirname ${(%):-%x} | xargs readlink -f`
else
echo "WARNING: unknown shell; need source setup.sh from the TaPaSCo root dir!"
echo "WARNING: unknown shell; need to source setup.sh from the TaPaSCo root dir!"
export TAPASCO_HOME=$PWD
fi
echo "TAPASCO_HOME=$TAPASCO_HOME"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment