author | Channappa BV<channappa.vakkalad@oracle.com> |
Wed, 20 Jul 2016 03:28:41 -0700 | |
branch | s11u3-sru |
changeset 6435 | c1b087ff0a7e |
parent 176 | 11a04b640bf2 |
permissions | -rwxr-xr-x |
176
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
1 |
#!/bin/sh |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
2 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
3 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
4 |
# CDDL HEADER START |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
5 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
6 |
# The contents of this file are subject to the terms of the |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
7 |
# Common Development and Distribution License (the "License"). |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
8 |
# You may not use this file except in compliance with the License. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
9 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
10 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
11 |
# or http://www.opensolaris.org/os/licensing. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
12 |
# See the License for the specific language governing permissions |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
13 |
# and limitations under the License. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
14 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
15 |
# When distributing Covered Code, include this CDDL HEADER in each |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
16 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
17 |
# If applicable, add the following below this CDDL HEADER, with the |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
18 |
# fields enclosed by brackets "[]" replaced with your own identifying |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
19 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
20 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
21 |
# CDDL HEADER END |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
22 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
23 |
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
24 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
25 |
|
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
26 |
|
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
27 |
# GNU emacs is delivered to Solaris as a core package (pkg:/editor/gnu-emacs) |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
28 |
# that contains a complete emacs environment, minus the actual emacs |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
29 |
# binaries. There are multiple binaries, which are optionally |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
30 |
# installed from separate packages: |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
31 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
32 |
# emacs-gtk (pkg:/editor/gnu-emacs/gnu-emacs-gtk) |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
33 |
# X11 support, using the GTK toolkit. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
34 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
35 |
# emacs-x (pkg:/editor/gnu-emacs/gnu-emacs-x11) |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
36 |
# X11 support, using the Athena (Xaw) toolkit. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
37 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
38 |
# emacs-nox (pkg:/editor/gnu-emacs/gnu-emacs-x11) |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
39 |
# Pure tty emacs, without any X Window support. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
40 |
# emacs-nox can run on a system minimized to not include |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
41 |
# the X11 libraries. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
42 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
43 |
# This script is installed as /usr/bin/emacs. It examines the |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
44 |
# emacs binaries on the system, and runs the "best" version available. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
45 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
46 |
for EXE in emacs-gtk emacs-x emacs-nox; do |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
47 |
if [ -f /usr/bin/$EXE ]; then |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
48 |
exec /usr/bin/$EXE "$@" |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
49 |
fi |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
50 |
done |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
51 |
|
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
52 |
# If we get here, the system has pkg:/editor/gnu-emacs installed without |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
53 |
# one of the packages that deliver the executables. That's not supposed to |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
54 |
# happen, because the packages specify dependencies to prevent it, but |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
55 |
# if it does, issue an appropriate message. |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
56 |
# |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
57 |
echo "$0: no emacs binaries available. Install software package pkg:/editor/gnu-emacs/gnu-emacs-gtk, pkg:/editor/gnu-emacs/gnu-emacs-x11, or pkg:/editor/gnu-emacs/gnu-emacs-x11" 1>&2 |
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
58 |
|
11a04b640bf2
7029475 Move gnu-emacs to userland
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
diff
changeset
|
59 |
exit 1 |