root/trunk/scripts/macosx/postflight

Revision 4662, 1.8 KB (checked in by pmoura, 5 days ago)

Updated copyright notice.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3## ================================================================
4## Logtalk - Open source object-oriented logic programming language
5## Release 2.35.0
6##
7## Copyright (c) 1998-2009 Paulo Moura.        All Rights Reserved.
8## Logtalk is free software.  You can redistribute it and/or modify
9## it under the terms of the "Artistic License 2.0" as published by
10## The Perl Foundation. Consult the "LICENSE.txt" file for details.
11## ================================================================
12
13echo ""
14echo "Checking for the Logtalk environment variable definitions..."
15echo ""
16
17if grep "LOGTALKHOME=/opt/local/share/logtalk" /etc/profile >/dev/null 2>&1; then
18    echo "Logtalk environment variables default values already set for bash!"
19else
20    /bin/cp -fp /etc/profile /etc/profile.lgtsaved
21    echo '' >> /etc/profile
22    echo '# Logtalk environment variables default values' >> /etc/profile
23    echo 'LOGTALKHOME=/opt/local/share/logtalk' >> /etc/profile
24    echo 'LOGTALKUSER=$HOME/logtalk' >> /etc/profile
25    echo 'export LOGTALKHOME LOGTALKUSER' >> /etc/profile
26fi
27
28if grep "setenv LOGTALKHOME /opt/local/share/logtalk" /etc/csh.cshrc >/dev/null 2>&1; then
29    echo "Logtalk environment variables default values already set for csh!"
30else
31    /bin/cp -fp /etc/csh.cshrc /etc/csh.cshrc.lgtsaved
32    echo '' >> /etc/csh.cshrc
33    echo '# Logtalk environment variables default values' >> /etc/csh.cshrc
34    echo "setenv LOGTALKHOME /opt/local/share/logtalk" >> /etc/csh.cshrc
35    echo 'setenv LOGTALKUSER $HOME/logtalk' >> /etc/csh.cshrc
36fi
37
38echo ""
39echo "Creating a link to the Logtalk installation folder in the /Applications folder..."
40ln -sf /opt/local/share/logtalk /Applications/Logtalk
41open /Applications/Logtalk/
42open /Applications/Logtalk/scripts/macosx/command_files
43open /Applications/Logtalk/README.txt
44
45echo ""
46echo "You have succesfully installed Logtalk!"
47echo ""
Note: See TracBrowser for help on using the browser.