Commit 1afe0bfa authored by Michael Hanus 's avatar Michael Hanus

Make configure-prolog script robust against `readlink` errors

parent c4cd147c
Pipeline #1607 passed with stages
in 217 minutes and 4 seconds
......@@ -43,7 +43,8 @@ if [ ! -x "$SICSTUSPROLOG" -a ! -x "$SWIPROLOG" ] ; then
SICSTUSPROLOG=`which sicstus 2> /dev/null`
fi
if [ -x "$SICSTUSPROLOG" ] ; then
SICSTUSPROLOG=`readlink -f $SICSTUSPROLOG`
# try to get absolute path name:
SICSTUSPROLOG=`readlink -f $SICSTUSPROLOG 2> /dev/null || echo $SICSTUSPROLOG`
echo "halt." | $SICSTUSPROLOG > /tmp/sicstusout$$ 2>&1
if [ $? -ne 0 ] ; then
SICSTUSPROLOG=
......@@ -62,7 +63,8 @@ if [ -z "$SICSTUSPROLOG" ] ; then
SWIPROLOG=`which swipl 2> /dev/null`
fi
if [ -x "$SWIPROLOG" ] ; then
SWIPROLOG=`readlink -f $SWIPROLOG`
# try to get absolute path name:
SWIPROLOG=`readlink -f $SWIPROLOG 2> /dev/null || echo $SWIPROLOG`
echo "halt." | $SWIPROLOG > /tmp/swiprologout$$ 2>&1
if [ $? -ne 0 ] ; then
SWIPROLOG=
......
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