Changeset 4076 for trunk/integration

Show
Ignore:
Timestamp:
02/13/08 04:39:43 (11 months ago)
Author:
pmoura
Message:

Removed the "check.sh" auxiliary script. As silly as it seems, there is no reliable solution to put the checks in their own file that would be source'd within each individual integration script!

Location:
trunk/integration
Files:
1 removed
13 modified

Legend:

Unmodified
Added
Removed
  • trunk/integration/bplgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec bp -g  "consult('$LOGTALKHOME/integration/logtalk_bp.pl'), \$bp_top_level" "$@" 
  • trunk/integration/ciaolgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec ciaosh -l "$LOGTALKHOME/integration/logtalk_ciao.pl" "$@" 
  • trunk/integration/cxlgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec cxprolog --goal "silent_consult('$LOGTALKHOME/integration/logtalk_cx.pl')" "$@" 
  • trunk/integration/eclipselgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec eclipse -b "$LOGTALKHOME/integration/logtalk_eclipse.pl" "$@" 
  • trunk/integration/gplgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec gprolog --init-goal "['$LOGTALKUSER/configs/gnu.config','$LOGTALKHOME/integration/logtalk_gp.pl','$LOGTALKUSER/libpaths/libpaths.pl']" "$@" 
  • trunk/integration/plclgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec "$PLC"/plc -h 4096k -l 2048k -g 4096k -e "(consult('$LOGTALKHOME/integration/logtalk_plc.pl'), '\$root')." "$@" 
  • trunk/integration/qplgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec qp -s 3072 -d 1024 -h 2048 -g "['$LOGTALKHOME/integration/logtalk_qp.pl']." "$@" 
  • trunk/integration/quintuslgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273exec prolog +l "$LOGTALKHOME/integration/logtalk_quintus.pl" +z "$LOGTALKHOME" "$LOGTALKUSER" "$@" 
  • trunk/integration/sicstuslgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else 
     67    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
     68    echo "by running the \"cplgtdirs\" shell script:" 
     69    cplgtdirs 
     70fi 
     71echo 
    1172 
    1273if sicstus -f --goal "halt." 2>&1 | grep "SICStus 4" 2>&1 >/dev/null; then 
  • trunk/integration/swilgt.sh

    r4072 r4076  
    88## ================================================================ 
    99 
    10 source $LOGTALKHOME/integration/checks.sh 
     10## As silly as it seems, there is no reliable solution to put the following 
     11## checks in their own file that would be source'd within each individual   
     12## integration script!!! 
     13 
     14if ! [ "$LOGTALKHOME" ]; then 
     15    echo "The environment variable LOGTALKHOME should be defined first, pointing" 
     16    echo "to your Logtalk installation directory!" 
     17    echo "Trying the default locations for the Logtalk installation..." 
     18    if [ -d "/usr/local/share/logtalk" ]; then 
     19        LOGTALKHOME=/usr/local/share/logtalk 
     20        echo "... using Logtalk installation found at /usr/local/share/logtalk" 
     21    elif [ -d "/usr/share/logtalk" ]; then 
     22        LOGTALKHOME=/usr/share/logtalk 
     23        echo "... using Logtalk installation found at /usr/share/logtalk" 
     24    elif [ -d "/opt/local/share/logtalk" ]; then 
     25        LOGTALKHOME=/opt/local/share/logtalk 
     26        echo "... using Logtalk installation found at /opt/local/share/logtalk" 
     27    elif [ -d "/opt/share/logtalk" ]; then 
     28        LOGTALKHOME=/opt/share/logtalk 
     29        echo "... using Logtalk installation found at /opt/share/logtalk" 
     30    else 
     31        echo "... unable to locate Logtalk installation directory!" 
     32        echo 
     33        exit 1 
     34    fi 
     35    echo 
     36elif ! [ -d "$LOGTALKHOME" ]; then 
     37    echo "The environment variable LOGTALKHOME points to a non-existing directory!" 
     38    echo "Its current value is: $LOGTALKHOME" 
     39    echo "The variable must be set to your Logtalk installation directory!" 
     40    echo 
     41    exit 1 
     42fi 
     43export LOGTALKHOME 
     44 
     45if ! [ "$LOGTALKUSER" ]; then 
     46    echo "The environment variable LOGTALKUSER should be defined first, pointing" 
     47    echo "to your Logtalk user directory!" 
     48    echo "Trying the default location for the Logtalk user directory..." 
     49    echo 
     50    export LOGTALKUSER=$HOME/logtalk 
     51fi 
     52 
     53if [ -d "$LOGTALKUSER" ]; then 
     54    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     55        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     56        echo "Creating an up-to-date Logtalk user directory..." 
     57        cplgtdirs 
     58    else 
     59        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     60        if [ $current -lt 2313 ]; then 
     61            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     62            echo "Creating an up-to-date Logtalk user directory..." 
     63            cplgtdirs 
     64        fi 
     65    fi 
     66else