root/tags/lgt2310/scripts/install.sh

Revision 3941, 3.2 KB (checked in by pmoura, 13 months ago)

Updated release number to 2.31.0 due to the incompatible changes in this version regarding compiler hooks.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3## ================================================================
4## Logtalk - Open source object-oriented logic programming language
5## Release 2.31.0
6##
7## Copyright (c) 1998-2007 Paulo Moura.  All Rights Reserved.
8## ================================================================
9
10if [ -z "$1" ]; then
11    if [ -f "/etc/debian_version" ]; then
12        prefix=/usr
13    else
14        case $( uname -s ) in
15            Darwin  ) prefix=/opt/local;;
16            *       ) prefix=/usr/local;;
17        esac
18    fi
19    mkdir -p $prefix
20else
21    prefix="$1"
22fi
23
24if ! [ -d "$prefix" ]; then
25    echo "Directory prefix does not exist!"
26    echo
27    exit 1
28fi
29
30echo
31echo "Installing Logtalk on $prefix/share ..."
32echo
33
34mkdir -p $prefix/share
35
36rm -rf $prefix/share/lgt2310
37rm -f $prefix/share/logtalk
38
39mkdir $prefix/share/lgt2310
40
41cd ..
42cp -R * $prefix/share/lgt2310
43
44cd $prefix/share/lgt2310
45chmod a+x scripts/cleandist.sh
46scripts/cleandist.sh
47
48cd ..
49ln -sf lgt2310 logtalk
50
51mkdir -p $prefix/bin
52cd $prefix/bin
53
54ln -sf ../share/logtalk/scripts/cplgtdirs.sh cplgtdirs
55ln -sf ../share/logtalk/xml/lgt2pdf.sh lgt2pdf
56ln -sf ../share/logtalk/xml/lgt2html.sh lgt2html
57ln -sf ../share/logtalk/xml/lgt2xml.sh lgt2xml
58
59echo "Links to the \"cplgtdirs\", \"lgt2pdf\", \"lgt2html\", and \"lgt2xml\" scripts"
60echo "have been created on \"$prefix/bin\"; you may need to add this directory"
61echo "to your execution path."
62echo
63
64ln -sf ../share/logtalk/integration/bplgt.sh bplgt
65ln -sf ../share/logtalk/integration/ciaolgt.sh ciaolgt
66ln -sf ../share/logtalk/integration/cxlgt.sh cxlgt
67ln -sf ../share/logtalk/integration/eclipselgt.sh eclipselgt
68ln -sf ../share/logtalk/integration/gplgt.sh gplgt
69ln -sf ../share/logtalk/integration/plclgt.sh plclgt
70ln -sf ../share/logtalk/integration/qplgt.sh qplgt
71ln -sf ../share/logtalk/integration/sicstuslgt.sh sicstuslgt
72ln -sf ../share/logtalk/integration/swilgt.sh swilgt
73ln -sf ../share/logtalk/integration/xsblgt.sh xsblgt
74ln -sf ../share/logtalk/integration/xsbmtlgt.sh xsbmtlgt
75ln -sf ../share/logtalk/integration/yaplgt.sh yaplgt
76
77echo "The following integration scripts are installed for running Logtalk"
78echo "with selected back-end Prolog compilers:"
79echo
80echo "  B-Prolog:       bplgt       (first run must use sudo)"
81echo "  CIAO:           ciaolgt     (first run must use sudo)"
82echo "  CxProlog:       cxlgt"
83echo "  ECLiPSe:        eclipselgt"
84echo "  GNU Prolog:     gplgt"
85echo "  K-Prolog:       plclgt"
86echo "  Qu-Prolog:      qplgt"
87echo "  SICStus Prolog: sicstuslgt"
88echo "  SWI-Prolog:     swilgt"
89echo "  XSB:            xsblgt      (first run must use sudo)"
90echo "  XSB (MT):       xsbmtlgt    (first run must use sudo)"
91echo "  YAP:            yaplgt"
92echo
93echo "The Prolog integration scripts can be found on \"$prefix/bin\"."
94echo "Make sure that the Prolog compilers are properly installed and available"
95echo "on your execution path."
96echo
97echo "Users should ensure that the environment variable LOGTALKHOME is set to"
98echo "\"$prefix/share/logtalk\" and then run the \"cplgtdirs\" shell script once"
99echo "before running the integration scripts."
100echo
101echo "If you get an unexpected failure when using one of the Prolog integration"
102echo "scripts, consult the \"$prefix/share/logtalk/configs/NOTES.txt\" file"
103echo "for compatibility notes."
104echo
105echo "Logtalk basic installation completed."
106echo
Note: See TracBrowser for help on using the browser.