42aabce1bb
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1973 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
## ================================================================
|
|
## Logtalk - Open source object-oriented logic programming language
|
|
## Release 2.30.7
|
|
##
|
|
## Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
|
## ================================================================
|
|
|
|
echo ""
|
|
echo "Checking for the Logtalk environment variable definitions..."
|
|
echo ""
|
|
|
|
if grep "LOGTALKHOME=/opt/local/share/logtalk" /etc/profile >/dev/null 2>&1; then
|
|
echo "Logtalk environment variables default values already set for bash!"
|
|
else
|
|
/bin/cp -fp /etc/profile /etc/profile.lgtsaved
|
|
echo '' >> /etc/profile
|
|
echo '# Logtalk environment variables default values' >> /etc/profile
|
|
echo 'LOGTALKHOME=/opt/local/share/logtalk' >> /etc/profile
|
|
echo 'LOGTALKUSER=$HOME/logtalk' >> /etc/profile
|
|
echo 'export LOGTALKHOME LOGTALKUSER' >> /etc/profile
|
|
fi
|
|
|
|
if grep "setenv LOGTALKHOME /opt/local/share/logtalk" /etc/csh.cshrc >/dev/null 2>&1; then
|
|
echo "Logtalk environment variables default values already set for csh!"
|
|
else
|
|
/bin/cp -fp /etc/csh.cshrc /etc/csh.cshrc.lgtsaved
|
|
echo '' >> /etc/csh.cshrc
|
|
echo '# Logtalk environment variables default values' >> /etc/csh.cshrc
|
|
echo "setenv LOGTALKHOME /opt/local/share/logtalk" >> /etc/csh.cshrc
|
|
echo 'setenv LOGTALKUSER $HOME/logtalk' >> /etc/csh.cshrc
|
|
fi
|
|
|
|
echo ""
|
|
echo "Creating a link to the Logtalk installation folder in the /Applications folder..."
|
|
ln -sf /opt/local/share/logtalk /Applications/Logtalk
|
|
|
|
echo ""
|
|
echo "You have succesfully installed Logtalk!"
|
|
echo ""
|