root/tags/lgt2305/scripts/install.sh

Revision 3828, 3.1 KB (checked in by pmoura, 17 months ago)

Updated the "install.sh" script to set the installation prefix to "/usr" on Debian systems.

  • 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.30.5
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/lgt2305
37rm -f $prefix/share/logtalk
38
39mkdir $prefix/share/lgt2305
40
41cd ..
42cp -R * $prefix/share/lgt2305
43
44cd $prefix/share/lgt2305
45chmod a+x scripts/cleandist.sh
46scripts/cleandist.sh
47
48cd ..
49ln -sf lgt2305 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/yaplgt.sh yaplgt
75
76echo "The following integration scripts are installed for running Logtalk"
77echo "with selected back-end Prolog compilers:"
78echo
79echo "  B-Prolog:       bplgt       (first run must use sudo)"
80echo "  CIAO:           ciaolgt     (first run must use sudo)"
81echo "  CxProlog:       cxlgt"
82echo "  ECLiPSe:        eclipselgt"
83echo "  GNU Prolog:     gplgt"
84echo "  K-Prolog:       plclgt"
85echo "  Qu-Prolog:      qplgt"
86echo "  SICStus Prolog: sicstuslgt"
87echo "  SWI-Prolog:     swilgt"
88echo "  XSB:            xsblgt      (first run must use sudo)"
89echo "  YAP:            yaplgt"
90echo
91echo "The Prolog integration scripts can be found on \"$prefix/bin\"."
92echo "Make sure that the Prolog compilers are properly installed and available"
93echo "on your execution path."
94echo
95echo "Users should ensure that the environment variable LOGTALKHOME is set to"
96echo "\"$prefix/share/logtalk\" and then run the \"cplgtdirs\" shell script once"
97echo "before running the integration scripts."
98echo
99echo "If you get an unexpected failure when using one of the Prolog integration"
100echo "scripts, consult the \"$prefix/share/logtalk/configs/NOTES.txt\" file"
101echo "for compatibility notes."
102echo
103echo "Logtalk basic installation completed."
104echo
Note: See TracBrowser for help on using the browser.