diff options
author | Achim Gottinger <achim@gentoo.org> | 2001-03-20 05:53:12 +0000 |
---|---|---|
committer | Achim Gottinger <achim@gentoo.org> | 2001-03-20 05:53:12 +0000 |
commit | 4415b4ee260378e5157a93df32c252270308b7e1 (patch) | |
tree | 605a3792db7d2a65fc908c9d29442a8dc5ce76d8 /app-text/sgml-common | |
parent | *** empty log message *** (diff) | |
download | gentoo-2-4415b4ee260378e5157a93df32c252270308b7e1.tar.gz gentoo-2-4415b4ee260378e5157a93df32c252270308b7e1.tar.bz2 gentoo-2-4415b4ee260378e5157a93df32c252270308b7e1.zip |
*** empty log message ***
Diffstat (limited to 'app-text/sgml-common')
-rw-r--r-- | app-text/sgml-common/files/sgml-common-0.6.1-ent-Makefile.in-gentoo.diff | 11 | ||||
-rwxr-xr-x | app-text/sgml-common/files/sgml-common-0.6.1-install-catalog.in | 163 |
2 files changed, 174 insertions, 0 deletions
diff --git a/app-text/sgml-common/files/sgml-common-0.6.1-ent-Makefile.in-gentoo.diff b/app-text/sgml-common/files/sgml-common-0.6.1-ent-Makefile.in-gentoo.diff new file mode 100644 index 000000000000..e9dbb572a10a --- /dev/null +++ b/app-text/sgml-common/files/sgml-common-0.6.1-ent-Makefile.in-gentoo.diff @@ -0,0 +1,11 @@ +--- iso-entities/Makefile.in~ Tue Jan 30 15:43:34 2001 ++++ iso-entities/Makefile.in Sun Mar 18 22:43:13 2001 +@@ -62,7 +62,7 @@ + VERSION = @VERSION@ + docdir = @docdir@ + +-isoentdir = $(prefix)/share/sgml/sgml-iso-entities-8879.1986 ++isoentdir = $(prefix)/share/sgml/sgml/ent/iso-8879.1986 + isoent_DATA = ISOamsa.ent ISOamsb.ent ISOamsc.ent ISOamsn.ent ISOamso.ent ISOamsr.ent ISObox.ent ISOcyr1.ent ISOcyr2.ent ISOdia.ent ISOgrk1.ent ISOgrk2.ent ISOgrk3.ent ISOgrk4.ent ISOlat1.ent ISOlat2.ent ISOnum.ent ISOpub.ent ISOtech.ent catalog + + diff --git a/app-text/sgml-common/files/sgml-common-0.6.1-install-catalog.in b/app-text/sgml-common/files/sgml-common-0.6.1-install-catalog.in new file mode 100755 index 000000000000..ad0d8b988db8 --- /dev/null +++ b/app-text/sgml-common/files/sgml-common-0.6.1-install-catalog.in @@ -0,0 +1,163 @@ +#!/bin/sh +# Script to install a catalog in the centralized SGML catalog +# Send any comments to Eric Bischoff <eric@caldera.de> +# This program is under GPL license. See LICENSE file for details. + +# Set help message +SGML_HELP_MESSAGE="Usage: `basename $0` [<option>] <action>\n\ +where <option> is:\n\ +\040 -d|--delegate: \t\t\t Use DELEGATE instead of CATALOG\n\ +and where <action> is:\n\ +\040 -a|--add <centralized> <ordinary>: \t Declare ordinary catalog in the centralized catalog\n\ +\040 -r|--remove <centralized> <ordinary>:\t Remove ordinary catalog from the centralized catalog\n\ +\040 -h, --help: \t\t\t\t Print this help message and exit\n\ +\040 -v, --version: \t\t\t Print the version number and exit\n" + +# Set version message +SGML_VERSION_MESSAGE="sgml-common version @VERSION@ (install-catalog version 1.0)" + +# Set type of pointer +SGML_POINTER="CATALOG" + +# Set action to be performed +SGML_ACTION="" + +# Set catalogs +SGML_CENTRALIZED="" +SGML_ORDINARY="" + +# Process options +case $1 in + -d|--delegate) SGML_POINTER="DELEGATE" + shift 1 + ;; +esac + +# Process actions +case $1 in + -a|--add) SGML_ACTION="addition" + SGML_CENTRALIZED=$2 + SGML_ORDINARY=$3 + ;; + -r|--remove) if [ -z "$3" -o "$3" = "--version" ] + then + echo "install-catalog: Old syntax; doing nothing" + exit 0 + fi + SGML_ACTION="removal" + SGML_CENTRALIZED=$2 + SGML_ORDINARY=$3 + ;; + -h|--help) echo -e $SGML_HELP_MESSAGE + exit 0 + ;; + -v|--version) echo -e $SGML_VERSION_MESSAGE + exit 0 + ;; + --install) echo "install-catalog: Old syntax; doing nothing" + exit 0 + ;; + *) echo -e $SGML_HELP_MESSAGE >&2 + exit 1 + ;; +esac + +# Check that the super catalog can be created and changed and deleted +if [ ! -w ${ROOT}etc/sgml ] +then + echo "`basename $0`: unable to write in ${ROOT}etc/sgml." >&2 + exit 2 +fi +case $SGML_ACTION in + addition) + if [ -e ${ROOT}etc/sgml/catalog -a ! -w ${ROOT}etc/sgml/catalog ] + then + echo "`basename $0`: can not modify \"${ROOT}etc/sgml/catalog\"." >&2 + exit 2 + fi + ;; + removal) + if [ ! -w ${ROOT}etc/sgml/catalog ] + then + echo "`basename $0`: can not modify \"${ROOT}etc/sgml/catalog\"." >&2 + exit 2 + fi + ;; +esac + +# Check that the centralized catalog can be created, changed and deleted +if [ -z "$SGML_CENTRALIZED" ] +then + echo -e $SGML_HELP_MESSAGE >&2 + exit 1 +fi +case $SGML_ACTION in + addition) + if [ -e $SGML_CENTRALIZED -a ! -w $SGML_CENTRALIZED ] + then + echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2 + exit 2 + fi + ;; + removal) + if [ ! -w $SGML_CENTRALIZED ] + then + echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2 + exit 2 + fi + ;; +esac + +# Check that we have at least one ordinary package to process +if [ -z "$SGML_ORDINARY" ] +then + echo -e $SGML_HELP_MESSAGE >&2 + exit 1 +fi +case $SGML_ACTION in + addition) + if [ ! -s $SGML_ORDINARY ] + then + echo "`basename $0`: \"$SGML_ORDINARY\" does not exist or is empty." >&2 + exit 2 + fi + ;; +esac + +# Installation or removal of pointers +case $SGML_ACTION in + addition) + echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED" + if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null + then + echo "Warning: $SGML_ORDINARY is already installed in the centralized catalog $SGML_CENTRALIZED" >&2 + else + echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED + fi + grep -q $SGML_CENTRALIZED ${ROOT}etc/sgml/catalog 2>/dev/null + if [ $? -ne 0 ] + then + echo "`basename $0`: addition of $SGML_CENTRALIZED in ${ROOT}etc/sgml/catalog" + echo "$SGML_POINTER $SGML_CENTRALIZED" >> ${ROOT}etc/sgml/catalog + fi + ;; + removal) + echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED" + if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null + then + sed -e "\:$SGML_POINTER $SGML_ORDINARY:d" < $SGML_CENTRALIZED > ${SGML_CENTRALIZED}.new + mv ${SGML_CENTRALIZED}.new $SGML_CENTRALIZED + else + echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2 + fi + if [ ! -s $SGML_CENTRALIZED ] + then + rm $SGML_CENTRALIZED + echo "`basename $0`: removal of $SGML_CENTRALIZED from ${ROOT}etc/sgml/catalog" + sed -e "\:$SGML_POINTER $SGML_CENTRALIZED:d" < ${ROOT}etc/sgml/catalog > ${ROOT}etc/sgml/catalog.new + mv ${ROOT}etc/sgml/catalog.new ${ROOT}etc/sgml/catalog + fi + ;; +esac + +exit 0 |