This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/scripts/macosx/postflight
pmoura b697f3d34e Logtalk 2.29.3 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1781 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-01-24 11:01:56 +00:00

38 lines
1.3 KiB
Bash

#!/bin/bash
## =================================================================
## Logtalk - Object oriented extension to Prolog
## Release 2.29.3
##
## Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
## =================================================================
echo ""
echo "Checking the LOGTALKHOME environment variable definition..."
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 "You have succesfully installed Logtalk!"
echo ""