root/tags/lgt2202/scripts/make_swilgt.sh

Revision 1438, 1.2 KB (checked in by pmoura, 4 years ago)

Updated Logtalk release number to 2.20.2.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3## =================================================================
4## Logtalk - Object oriented extension to Prolog
5## Release 2.20.2
6##
7## Copyright (c) 1998-2004 Paulo Moura.  All Rights Reserved.
8## =================================================================
9
10echo
11echo "Creating a script named swilgt for running Logtalk with SWI-Prolog..."
12
13if ! [ $LOGTALKHOME ]
14then
15    echo "The environment variable LOGTALKHOME must be defined first!"
16else
17    cd $LOGTALKHOME
18    if [ -z "$1" ]; then
19        prefix=/usr/local
20    else
21        prefix="$1"
22    fi
23    if ! [ -d bin ]
24    then
25        mkdir bin
26    fi
27    cd bin
28    echo ":- system_module." > logtalkswi.pl
29    cat ../compiler/logtalk.pl >> logtalkswi.pl
30    echo ":- consult('\$LOGTALKHOME/configs/swi.config')." > logtalkswi.rc
31    echo ":- consult('\$LOGTALKHOME/configs/swihook.pl')." >> logtalkswi.rc
32    echo ":- consult('\$LOGTALKHOME/bin/logtalkswi.pl')." >> logtalkswi.rc
33    echo "#/bin/sh" > swilgt
34    echo "swipl -f \$LOGTALKHOME/bin/logtalkswi.rc" >> swilgt
35    chmod a+x swilgt
36    ln -sf $LOGTALKHOME/bin/swilgt $prefix/bin/swilgt
37    echo "Done. A link to the script was been created in $prefix/bin."
38    echo "Users should define the environment variable LOGTALKHOME in"
39    echo "order to use the script."
40    echo
41fi
Note: See TracBrowser for help on using the browser.