Home | History | Annotate | Download | only in gzip
      1 #!/bin/sh
      2 #
      3 # CDDL HEADER START
      4 #
      5 # The contents of this file are subject to the terms of the
      6 # Common Development and Distribution License (the "License").
      7 # You may not use this file except in compliance with the License.
      8 #
      9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     10 # or http://www.opensolaris.org/os/licensing.
     11 # See the License for the specific language governing permissions
     12 # and limitations under the License.
     13 #
     14 # When distributing Covered Code, include this CDDL HEADER in each
     15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     16 # If applicable, add the following below this CDDL HEADER, with the
     17 # fields enclosed by brackets "[]" replaced with your own identifying
     18 # information: Portions Copyright [yyyy] [name of copyright owner]
     19 #
     20 # CDDL HEADER END
     21 #
     22 #
     23 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #ident	"@(#)install-gzip	1.11	07/04/02 SMI"
     27 
     28 TOP=`pwd`
     29 PREFIX=${ROOT}/usr
     30 BINDIR=${PREFIX}/bin
     31 INFODIR=${PREFIX}/sfw/info
     32 SHAREDIR=${PREFIX}/share
     33 MAN1DIR=${SHAREDIR}/man/man1
     34 
     35 . ${SRC}/tools/install.subr
     36 
     37 # manpages are converted by sunman-stability sed-script to
     38 # append the stability and availability and to change all references
     39 # from 'z' commands to 'gz' commands. Then all referencing man pages
     40 # are (re)created. 
     41 
     42 MANSCRIPT=sunman-stability
     43 
     44 for i in ${VERS}/*.1
     45 do
     46 	manpage=`basename $i | sed 's/^z/gz/'`
     47 	_install M ${i} ${MAN1DIR}/${manpage} 444
     48 done
     49 
     50 for i in gzcat.1 gunzip.1 gzcmp.1 gzegrep.1 gzfgrep.1
     51 do
     52 	rm -rf ${MAN1DIR}/$i
     53 	echo ".so man1/$i" | sed -e s/gzcat/gzip/ -e  s/gunzip/gzip/ \
     54 	  -e s/gzcmp/gzdiff/ -e s/gzegrep/gzgrep/ -e s/gzfgrep/gzgrep/ > ${MAN1DIR}/$i
     55 	chmod 444 ${MAN1DIR}/$i
     56 done
     57 
     58 cd ${VERS}
     59 
     60 # install info page for gzip	
     61 _install N gzip.info ${INFODIR}/gzip.info 444
     62 
     63 install-info --dir-file=${INFODIR}/dir ${INFODIR}/gzip.info >/dev/null 2>&1
     64 
     65 for i in zdiff zgrep zforce
     66 do
     67 	_install S ${i} ${BINDIR}/g${i} 555
     68 done
     69 
     70 _install H ${BINDIR}/gzgrep ${BINDIR}/gzegrep
     71 _install H ${BINDIR}/gzgrep ${BINDIR}/gzfgrep
     72 _install H ${BINDIR}/gzdiff ${BINDIR}/gzcmp
     73 
     74 _install S gzexe ${BINDIR}/gzexe 555
     75 
     76 _install E gzip ${BINDIR}/gzip 555
     77 
     78 _install H ${BINDIR}/gzip ${BINDIR}/gunzip
     79 _install H ${BINDIR}/gzip ${BINDIR}/gzcat
     80 
     81 rm -f ${BINDIR}/gznew
     82 sed s/znew/gznew/g znew > ${BINDIR}/gznew
     83 chmod 555 ${BINDIR}/gznew
     84 
     85 rm -f ${BINDIR}/gzmore
     86 sed s/zmore/gzmore/g zmore > ${BINDIR}/gzmore
     87 chmod 555 ${BINDIR}/gzmore
     88 
     89 _install S zless ${BINDIR}/gzless 555
     90 
     91 exit 0
     92