2004-04-26 00:57:46 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2004-08-16 17:41:11 +01:00
|
|
|
## =================================================================
|
|
|
|
## Logtalk - Object oriented extension to Prolog
|
2007-03-28 23:44:31 +01:00
|
|
|
## Release 2.29.5
|
2004-08-16 17:41:11 +01:00
|
|
|
##
|
2007-01-10 12:46:10 +00:00
|
|
|
## Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
2004-08-16 17:41:11 +01:00
|
|
|
## =================================================================
|
|
|
|
|
2004-04-26 00:57:46 +01:00
|
|
|
if [ -z "$1" ]; then
|
|
|
|
prefix=/usr/local
|
|
|
|
else
|
|
|
|
prefix="$1"
|
|
|
|
fi
|
|
|
|
|
2005-08-08 18:34:33 +01:00
|
|
|
if ! [ -d "$prefix" ]; then
|
2005-08-08 13:13:45 +01:00
|
|
|
echo "Directory prefix does not exist!"
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2005-05-24 00:33:41 +01:00
|
|
|
echo
|
|
|
|
echo "Installing Logtalk on $prefix ..."
|
|
|
|
echo
|
|
|
|
|
2007-03-28 23:44:31 +01:00
|
|
|
rm -rf $prefix/lgt2295
|
2004-04-26 00:57:46 +01:00
|
|
|
rm -f $prefix/logtalk
|
|
|
|
|
2007-03-28 23:44:31 +01:00
|
|
|
mkdir $prefix/lgt2295
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
cd ..
|
2007-03-28 23:44:31 +01:00
|
|
|
cp -R * $prefix/lgt2295
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
cd $prefix
|
2007-03-28 23:44:31 +01:00
|
|
|
chmod -R go-w,a+r lgt2295
|
|
|
|
chmod a+x lgt2295
|
|
|
|
chmod a+x lgt2295/scripts/*.sh
|
|
|
|
chmod a-x lgt2295/scripts/*.js
|
|
|
|
chmod a+x lgt2295/scripts/linux/*.sh
|
|
|
|
chmod a+x lgt2295/scripts/macosx/postflight
|
|
|
|
chmod a+x lgt2295/xml/*.sh
|
|
|
|
chmod a-x lgt2295/xml/*.js
|
|
|
|
ln -sf lgt2295 logtalk
|
2004-04-26 00:57:46 +01:00
|
|
|
|
2004-10-25 12:13:58 +01:00
|
|
|
mkdir -p bin
|
2004-04-26 00:57:46 +01:00
|
|
|
cd bin
|
2005-05-24 00:33:41 +01:00
|
|
|
ln -sf ../logtalk/scripts/cplgtdirs.sh cplgtdirs
|
|
|
|
ln -sf ../logtalk/xml/lgt2pdf.sh lgt2pdf
|
|
|
|
ln -sf ../logtalk/xml/lgt2html.sh lgt2html
|
|
|
|
ln -sf ../logtalk/xml/lgt2xml.sh lgt2xml
|
2004-04-26 00:57:46 +01:00
|
|
|
|
2006-11-07 17:11:47 +00:00
|
|
|
echo "Logtalk basic installation completed. See the INSTALL and CUSTOMIZATION"
|
|
|
|
echo "files for details on customizing your working environment."
|
2005-05-24 00:33:41 +01:00
|
|
|
echo
|
|
|
|
echo "You may want to run some of the Prolog integration scripts, which you"
|
|
|
|
echo "will find on the same directory as this installer script."
|
2004-08-16 17:41:11 +01:00
|
|
|
echo
|
2006-11-07 17:11:47 +00:00
|
|
|
echo "Users must define the environment variable LOGTALKHOME pointing to"
|
|
|
|
echo "$prefix/logtalk and then run the shell script cplgtdirs"
|
2004-12-05 21:52:49 +00:00
|
|
|
echo "in order to copy the Logtalk user-modifiable files to their home"
|
|
|
|
echo "directories."
|
2004-04-26 00:57:46 +01:00
|
|
|
echo
|
2005-04-23 00:57:45 +01:00
|
|
|
echo "Links to the cplgtdirs, lgt2pdf, lgt2html, and lgt2xml scripts have"
|
2006-02-10 17:44:05 +00:00
|
|
|
echo "been created on $prefix/bin; you may need to add this directory to"
|
2004-10-25 12:13:58 +01:00
|
|
|
echo "your execution path."
|
|
|
|
echo
|