annotate lib-src/add-big-package.sh @ 5600:80aed35416d7

ChangeLog cleanup
author Vin Shelton <acs@xemacs.org>
date Mon, 21 Nov 2011 09:26:45 -0500
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 #! /bin/sh
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 # add-big-package.sh --- Add multiple file package to Package Lisp Hierarchy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 # Copyright (C) 1997 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 # Author: SL Baur <steve@xemacs.org>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 # Maintainer: SL Baur <steve@xemacs.org>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 # Keywords: packages internal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 # This file is part of XEmacs.
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
10 #
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
11 # XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
12 # under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
13 # Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
14 # option) any later version.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
15 #
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
16 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
19 # for more details.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
20 #
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 # You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
22 # along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ### Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ## This file copies a single lisp file into an XEmacs package hierarchy and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ## performs the necessary magic so that it will be autoloaded at the next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 ## dump.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ## Parameters:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ## $1 -- Full path to an XEmacsen later than 20.3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ## $2 -- Full path to a lisp package tarball to install
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ## $3 -- Full path to a lisp directory in an XEmacs package hierarchy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ## This directory will be created if it does not exist.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ## NOTE: the directory name should *not* end in a trailing slash
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 ### Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 XEMACS="$1" # Not used at present
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 LISP_FILE="$2" # Should be a binary package tarball
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 DEST_DIR="$3" # Should be a top level package directory
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 # Test for valid XEmacs executable and valid input file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 if [ ! -f "${LISP_FILE}" -o ! -x "${XEMACS}" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 exit 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 # Test for destination directory, creating if necessary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 test -d "${DEST_DIR}" || mkdir "${DEST_DIR}"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 test -d "${DEST_DIR}" || exit 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 # Very simple minded extraction for the first cut
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 # We'll get more sophisticated later
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 cd "${DEST_DIR}"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 gunzip -c "${LISP_FILE}" | tar xvf -
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 # Need to refresh the info/dir file, I don't know how to do that.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 exit 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 ### add-big-package.sh ends here