Changeset 4049 for trunk/integration

Show
Ignore:
Timestamp:
01/23/08 18:29:19 (12 months ago)
Author:
pmoura
Message:

Updated the POSIX Prolog integration scripts to check for an outdated Logtalk user directory, creating a new one if necessary by running the "cplgtdirs" script (a backup is automatically made of the old directory).

Location:
trunk/integration
Files:
14 modified

Legend:

Unmodified
Added
Removed
  • trunk/integration/bplgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/ciaolgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/cxlgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    3737    exit 1 
    3838fi 
    39  
    4039export LOGTALKHOME 
    4140 
     
    4443    echo "to your Logtalk user directory!" 
    4544    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4646    export LOGTALKUSER=$HOME/logtalk 
    47     if [ -d "$LOGTALKUSER" ]; then       
    48         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4954    else 
    50         echo "... Logtalk user directory not found at default location. Creating a" 
    51         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    52         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5361    fi 
    54 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5563    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5664    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/eclipselgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/gplgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/NOTES.txt

    r4036 r4049  
    4949The environment variables LOGTALKHOME and LOGTALKUSER should be defined  
    5050in order to run the integration scripts (see the "INSTALL.txt" file for  
    51 details on setting the variables). 
     51details on setting the variables). When the scripts detect an outdated  
     52Logtalk user directory, they create a new one by running the "cplgtdirs.sh"  
     53script (a backup is automatically made of the old directory). 
    5254 
    5355Note that the integration scripts and shortcuts may fail if you use non- 
  • trunk/integration/plclgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/qplgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/quintuslgt.sh

    r4040 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/sicstuslgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/swilgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/xsblgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/xsbmtlgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:" 
  • trunk/integration/yaplgt.sh

    r4036 r4049  
    1 #/bin/sh 
     1#/bin/bash 
    22 
    33## ================================================================ 
     
    4343    echo "to your Logtalk user directory!" 
    4444    echo "Trying the default location for the Logtalk user directory..." 
     45    echo 
    4546    export LOGTALKUSER=$HOME/logtalk 
    46     if [ -d "$LOGTALKUSER" ]; then       
    47         echo "... using Logtalk user directory found at $LOGTALKUSER" 
     47fi 
     48 
     49if [ -d "$LOGTALKUSER" ]; then 
     50    if ! [ -a "$LOGTALKUSER/VERSION.txt" ]; then 
     51        echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     52        echo "Creating an up-to-date Logtalk user directory..." 
     53        cplgtdirs 
    4854    else 
    49         echo "... Logtalk user directory not found at default location. Creating a" 
    50         echo "new Logtalk user directory by running the \"cplgtdirs\" shell script:" 
    51         cplgtdirs 
     55        current=`cat $LOGTALKUSER/VERSION.txt | sed 's/\.//g'` 
     56        if [ $current -lt 2313 ]; then 
     57            echo "Logtalk user directory at $LOGTALKUSER is outdated!" 
     58            echo "Creating an up-to-date Logtalk user directory..." 
     59            cplgtdirs 
     60        fi 
    5261    fi 
    53 elif ! [ -d "$LOGTALKUSER" ]; then 
     62else 
    5463    echo "Cannot find \$LOGTALKUSER directory! Creating a new Logtalk user directory" 
    5564    echo "by running the \"cplgtdirs\" shell script:"