(f90-font-lock-keywords-1): Fix highlighting of `type' forms.
[bpt/emacs.git] / mac / osx-install
CommitLineData
e0f712ba
AC
1#!/bin/sh
2
3#### osx-install: create the file ~/.MacOSX/environment.plist with
4#### appropriate paths for Emacs to access lisp and bin directories.
5#### On Mac OS X, this file contains values for environment variables
6#### seen by Aqua application launched in the Finder. This script
7#### must be run at the top level of a Mac OS X binary distribution.
8
9# Copyright (C) 2002 Free Software Foundation, Inc.
10#
11# This file is part of GNU Emacs.
12#
13# GNU Emacs is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2, or (at your option)
16# any later version.
17#
18# GNU Emacs is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with GNU Emacs; see the file COPYING. If not, write to the
25# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26# Boston, MA 02111-1307, USA.
27
28progname="$0"
29
30### Exit if a command fails.
31#set -e
32
33### Print out each line we read, for debugging's sake.
34set -v
35
36LANGUAGE=C
37LC_ALL=C
38LC_MESSAGES=
39LANG=
40export LANGUAGE LC_ALL LC_MESSAGES LANG
41
42## Don't restrict access to any files.
43umask 0
44
45### Make sure we're running in the right place.
46if [ ! -d Emacs.app -o ! -d libexec -o ! -d share ]; then
47 echo "${progname} must be run in the top directory of the Emacs" >&2
48 echo "binary distribution tree for Mac OS. cd to that directory" >&2
49 echo "and try again." >&2
50 exit 1
51fi
52
53versionfile=`ls share/emacs/21.*/lisp/version.el`
54
55### Find out which version of Emacs this is.
56shortversion=`grep 'defconst[ ]*emacs-version' ${versionfile} \
57 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
58version=`grep 'defconst[ ]*emacs-version' ${versionfile} \
59 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
60if [ ! "${version}" ]; then
61 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
62 exit 1
63fi
64
65echo Version numbers are $version and $shortversion
66
67homedir=`ls -d ~`
68initfile="${homedir}/.MacOSX/environment.plist"
69
70if [ -f ${initfile} ]; then
71 mv ${initfile} ${initfile}.old
72fi
73
74if [ -d ${homedir}/.MacOSX ]; then
75 mkdir ${homedir}/.MacOSX
76fi
77
78execpath=`ls -d libexec/emacs/21.*/powerpc-apple-*/`
79
80echo '<?xml version="1.0" encoding="UTF-8"?>' > ${initfile}
81echo '<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">' >> ${initfile}
82echo '<plist version="0.9">' >> ${initfile}
83echo '<dict>' >> ${initfile}
84echo ' <key>EMACSLOADPATH</key>' >> ${initfile}
85echo " <string>`pwd`/share/emacs/${version}/lisp/</string>" >> ${initfile}
86echo ' <key>EMACSPATH</key>' >> ${initfile}
87echo " <string>`pwd`/${execpath}:`pwd`/bin/</string>" >> ${initfile}
88echo ' <key>EMACSDATA</key>' >> ${initfile}
89echo " <string>`pwd`/share/emacs/${version}/etc/</string>" >> ${initfile}
90echo ' <key>EMACSDOC</key>' >> ${initfile}
91echo " <string>`pwd`/share/emacs/${version}/etc/</string>" >> ${initfile}
92echo ' <key>INFOPATH</key>' >> ${initfile}
93echo " <string>`pwd`/info/</string>" >> ${initfile}
94echo '</dict>' >> ${initfile}
95echo '</plist>' >> ${initfile}
96
97### osx-install ends here