xref: /illumos-gate/usr/src/grub/grub-0.97/missing (revision 1b8adde7)
17c478bd9Sstevel@tonic-gate#! /bin/sh
27c478bd9Sstevel@tonic-gate# Common stub for a few missing GNU programs while installing.
37c478bd9Sstevel@tonic-gate
4*1b8adde7SWilliam Kucharskiscriptversion=2004-09-07.08
57c478bd9Sstevel@tonic-gate
6*1b8adde7SWilliam Kucharski# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
77c478bd9Sstevel@tonic-gate#   Free Software Foundation, Inc.
87c478bd9Sstevel@tonic-gate# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
97c478bd9Sstevel@tonic-gate
107c478bd9Sstevel@tonic-gate# This program is free software; you can redistribute it and/or modify
117c478bd9Sstevel@tonic-gate# it under the terms of the GNU General Public License as published by
127c478bd9Sstevel@tonic-gate# the Free Software Foundation; either version 2, or (at your option)
137c478bd9Sstevel@tonic-gate# any later version.
147c478bd9Sstevel@tonic-gate
157c478bd9Sstevel@tonic-gate# This program is distributed in the hope that it will be useful,
167c478bd9Sstevel@tonic-gate# but WITHOUT ANY WARRANTY; without even the implied warranty of
177c478bd9Sstevel@tonic-gate# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
187c478bd9Sstevel@tonic-gate# GNU General Public License for more details.
197c478bd9Sstevel@tonic-gate
207c478bd9Sstevel@tonic-gate# You should have received a copy of the GNU General Public License
217c478bd9Sstevel@tonic-gate# along with this program; if not, write to the Free Software
227c478bd9Sstevel@tonic-gate# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237c478bd9Sstevel@tonic-gate# 02111-1307, USA.
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gate# As a special exception to the GNU General Public License, if you
267c478bd9Sstevel@tonic-gate# distribute this file as part of a program that contains a
277c478bd9Sstevel@tonic-gate# configuration script generated by Autoconf, you may include it under
287c478bd9Sstevel@tonic-gate# the same distribution terms that you use for the rest of that program.
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateif test $# -eq 0; then
317c478bd9Sstevel@tonic-gate  echo 1>&2 "Try \`$0 --help' for more information"
327c478bd9Sstevel@tonic-gate  exit 1
337c478bd9Sstevel@tonic-gatefi
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gaterun=:
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gate# In the cases where this matters, `missing' is being run in the
387c478bd9Sstevel@tonic-gate# srcdir already.
397c478bd9Sstevel@tonic-gateif test -f configure.ac; then
407c478bd9Sstevel@tonic-gate  configure_ac=configure.ac
417c478bd9Sstevel@tonic-gateelse
427c478bd9Sstevel@tonic-gate  configure_ac=configure.in
437c478bd9Sstevel@tonic-gatefi
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gatemsg="missing on your system"
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gatecase "$1" in
487c478bd9Sstevel@tonic-gate--run)
497c478bd9Sstevel@tonic-gate  # Try to run requested program, and just exit if it succeeds.
507c478bd9Sstevel@tonic-gate  run=
517c478bd9Sstevel@tonic-gate  shift
527c478bd9Sstevel@tonic-gate  "$@" && exit 0
537c478bd9Sstevel@tonic-gate  # Exit code 63 means version mismatch.  This often happens
547c478bd9Sstevel@tonic-gate  # when the user try to use an ancient version of a tool on
557c478bd9Sstevel@tonic-gate  # a file that requires a minimum version.  In this case we
567c478bd9Sstevel@tonic-gate  # we should proceed has if the program had been absent, or
577c478bd9Sstevel@tonic-gate  # if --run hadn't been passed.
587c478bd9Sstevel@tonic-gate  if test $? = 63; then
597c478bd9Sstevel@tonic-gate    run=:
607c478bd9Sstevel@tonic-gate    msg="probably too old"
617c478bd9Sstevel@tonic-gate  fi
627c478bd9Sstevel@tonic-gate  ;;
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate  -h|--h|--he|--hel|--help)
657c478bd9Sstevel@tonic-gate    echo "\
667c478bd9Sstevel@tonic-gate$0 [OPTION]... PROGRAM [ARGUMENT]...
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateHandle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
697c478bd9Sstevel@tonic-gateerror status if there is no known handling for PROGRAM.
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateOptions:
727c478bd9Sstevel@tonic-gate  -h, --help      display this help and exit
737c478bd9Sstevel@tonic-gate  -v, --version   output version information and exit
747c478bd9Sstevel@tonic-gate  --run           try to run the given command, and emulate it if it fails
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateSupported PROGRAM values:
777c478bd9Sstevel@tonic-gate  aclocal      touch file \`aclocal.m4'
787c478bd9Sstevel@tonic-gate  autoconf     touch file \`configure'
797c478bd9Sstevel@tonic-gate  autoheader   touch file \`config.h.in'
807c478bd9Sstevel@tonic-gate  automake     touch all \`Makefile.in' files
817c478bd9Sstevel@tonic-gate  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
827c478bd9Sstevel@tonic-gate  flex         create \`lex.yy.c', if possible, from existing .c
837c478bd9Sstevel@tonic-gate  help2man     touch the output file
847c478bd9Sstevel@tonic-gate  lex          create \`lex.yy.c', if possible, from existing .c
857c478bd9Sstevel@tonic-gate  makeinfo     touch the output file
867c478bd9Sstevel@tonic-gate  tar          try tar, gnutar, gtar, then tar without non-portable flags
877c478bd9Sstevel@tonic-gate  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gateSend bug reports to <bug-automake@gnu.org>."
90*1b8adde7SWilliam Kucharski    exit 0
917c478bd9Sstevel@tonic-gate    ;;
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
947c478bd9Sstevel@tonic-gate    echo "missing $scriptversion (GNU Automake)"
95*1b8adde7SWilliam Kucharski    exit 0
967c478bd9Sstevel@tonic-gate    ;;
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gate  -*)
997c478bd9Sstevel@tonic-gate    echo 1>&2 "$0: Unknown \`$1' option"
1007c478bd9Sstevel@tonic-gate    echo 1>&2 "Try \`$0 --help' for more information"
1017c478bd9Sstevel@tonic-gate    exit 1
1027c478bd9Sstevel@tonic-gate    ;;
1037c478bd9Sstevel@tonic-gate
104*1b8adde7SWilliam Kucharskiesac
105*1b8adde7SWilliam Kucharski
106*1b8adde7SWilliam Kucharski# Now exit if we have it, but it failed.  Also exit now if we
107*1b8adde7SWilliam Kucharski# don't have it and --version was passed (most likely to detect
108*1b8adde7SWilliam Kucharski# the program).
109*1b8adde7SWilliam Kucharskicase "$1" in
110*1b8adde7SWilliam Kucharski  lex|yacc)
111*1b8adde7SWilliam Kucharski    # Not GNU programs, they don't have --version.
112*1b8adde7SWilliam Kucharski    ;;
113*1b8adde7SWilliam Kucharski
114*1b8adde7SWilliam Kucharski  tar)
115*1b8adde7SWilliam Kucharski    if test -n "$run"; then
116*1b8adde7SWilliam Kucharski       echo 1>&2 "ERROR: \`tar' requires --run"
117*1b8adde7SWilliam Kucharski       exit 1
118*1b8adde7SWilliam Kucharski    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
119*1b8adde7SWilliam Kucharski       exit 1
120*1b8adde7SWilliam Kucharski    fi
121*1b8adde7SWilliam Kucharski    ;;
122*1b8adde7SWilliam Kucharski
123*1b8adde7SWilliam Kucharski  *)
1247c478bd9Sstevel@tonic-gate    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
1257c478bd9Sstevel@tonic-gate       # We have it, but it failed.
1267c478bd9Sstevel@tonic-gate       exit 1
127*1b8adde7SWilliam Kucharski    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
128*1b8adde7SWilliam Kucharski       # Could not run --version or --help.  This is probably someone
129*1b8adde7SWilliam Kucharski       # running `$TOOL --version' or `$TOOL --help' to check whether
130*1b8adde7SWilliam Kucharski       # $TOOL exists and not knowing $TOOL uses missing.
131*1b8adde7SWilliam Kucharski       exit 1
1327c478bd9Sstevel@tonic-gate    fi
133*1b8adde7SWilliam Kucharski    ;;
134*1b8adde7SWilliam Kucharskiesac
1357c478bd9Sstevel@tonic-gate
136*1b8adde7SWilliam Kucharski# If it does not exist, or fails to run (possibly an outdated version),
137*1b8adde7SWilliam Kucharski# try to emulate it.
138*1b8adde7SWilliam Kucharskicase "$1" in
139*1b8adde7SWilliam Kucharski  aclocal*)
1407c478bd9Sstevel@tonic-gate    echo 1>&2 "\
1417c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
1427c478bd9Sstevel@tonic-gate         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
1437c478bd9Sstevel@tonic-gate         to install the \`Automake' and \`Perl' packages.  Grab them from
1447c478bd9Sstevel@tonic-gate         any GNU archive site."
1457c478bd9Sstevel@tonic-gate    touch aclocal.m4
1467c478bd9Sstevel@tonic-gate    ;;
1477c478bd9Sstevel@tonic-gate
1487c478bd9Sstevel@tonic-gate  autoconf)
1497c478bd9Sstevel@tonic-gate    echo 1>&2 "\
1507c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
1517c478bd9Sstevel@tonic-gate         you modified \`${configure_ac}'.  You might want to install the
1527c478bd9Sstevel@tonic-gate         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
1537c478bd9Sstevel@tonic-gate         archive site."
1547c478bd9Sstevel@tonic-gate    touch configure
1557c478bd9Sstevel@tonic-gate    ;;
1567c478bd9Sstevel@tonic-gate
1577c478bd9Sstevel@tonic-gate  autoheader)
1587c478bd9Sstevel@tonic-gate    echo 1>&2 "\
1597c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
1607c478bd9Sstevel@tonic-gate         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
1617c478bd9Sstevel@tonic-gate         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
1627c478bd9Sstevel@tonic-gate         from any GNU archive site."
1637c478bd9Sstevel@tonic-gate    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
1647c478bd9Sstevel@tonic-gate    test -z "$files" && files="config.h"
1657c478bd9Sstevel@tonic-gate    touch_files=
1667c478bd9Sstevel@tonic-gate    for f in $files; do
1677c478bd9Sstevel@tonic-gate      case "$f" in
1687c478bd9Sstevel@tonic-gate      *:*) touch_files="$touch_files "`echo "$f" |
1697c478bd9Sstevel@tonic-gate				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
1707c478bd9Sstevel@tonic-gate      *) touch_files="$touch_files $f.in";;
1717c478bd9Sstevel@tonic-gate      esac
1727c478bd9Sstevel@tonic-gate    done
1737c478bd9Sstevel@tonic-gate    touch $touch_files
1747c478bd9Sstevel@tonic-gate    ;;
1757c478bd9Sstevel@tonic-gate
1767c478bd9Sstevel@tonic-gate  automake*)
1777c478bd9Sstevel@tonic-gate    echo 1>&2 "\
1787c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
1797c478bd9Sstevel@tonic-gate         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
1807c478bd9Sstevel@tonic-gate         You might want to install the \`Automake' and \`Perl' packages.
1817c478bd9Sstevel@tonic-gate         Grab them from any GNU archive site."
1827c478bd9Sstevel@tonic-gate    find . -type f -name Makefile.am -print |
1837c478bd9Sstevel@tonic-gate	   sed 's/\.am$/.in/' |
1847c478bd9Sstevel@tonic-gate	   while read f; do touch "$f"; done
1857c478bd9Sstevel@tonic-gate    ;;
1867c478bd9Sstevel@tonic-gate
1877c478bd9Sstevel@tonic-gate  autom4te)
1887c478bd9Sstevel@tonic-gate    echo 1>&2 "\
1897c478bd9Sstevel@tonic-gateWARNING: \`$1' is needed, but is $msg.
1907c478bd9Sstevel@tonic-gate         You might have modified some files without having the
1917c478bd9Sstevel@tonic-gate         proper tools for further handling them.
1927c478bd9Sstevel@tonic-gate         You can get \`$1' as part of \`Autoconf' from any GNU
1937c478bd9Sstevel@tonic-gate         archive site."
1947c478bd9Sstevel@tonic-gate
1957c478bd9Sstevel@tonic-gate    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
1967c478bd9Sstevel@tonic-gate    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
1977c478bd9Sstevel@tonic-gate    if test -f "$file"; then
1987c478bd9Sstevel@tonic-gate	touch $file
1997c478bd9Sstevel@tonic-gate    else
2007c478bd9Sstevel@tonic-gate	test -z "$file" || exec >$file
2017c478bd9Sstevel@tonic-gate	echo "#! /bin/sh"
2027c478bd9Sstevel@tonic-gate	echo "# Created by GNU Automake missing as a replacement of"
2037c478bd9Sstevel@tonic-gate	echo "#  $ $@"
2047c478bd9Sstevel@tonic-gate	echo "exit 0"
2057c478bd9Sstevel@tonic-gate	chmod +x $file
2067c478bd9Sstevel@tonic-gate	exit 1
2077c478bd9Sstevel@tonic-gate    fi
2087c478bd9Sstevel@tonic-gate    ;;
2097c478bd9Sstevel@tonic-gate
2107c478bd9Sstevel@tonic-gate  bison|yacc)
2117c478bd9Sstevel@tonic-gate    echo 1>&2 "\
2127c478bd9Sstevel@tonic-gateWARNING: \`$1' $msg.  You should only need it if
2137c478bd9Sstevel@tonic-gate         you modified a \`.y' file.  You may need the \`Bison' package
2147c478bd9Sstevel@tonic-gate         in order for those modifications to take effect.  You can get
2157c478bd9Sstevel@tonic-gate         \`Bison' from any GNU archive site."
2167c478bd9Sstevel@tonic-gate    rm -f y.tab.c y.tab.h
2177c478bd9Sstevel@tonic-gate    if [ $# -ne 1 ]; then
2187c478bd9Sstevel@tonic-gate        eval LASTARG="\${$#}"
2197c478bd9Sstevel@tonic-gate	case "$LASTARG" in
2207c478bd9Sstevel@tonic-gate	*.y)
2217c478bd9Sstevel@tonic-gate	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
2227c478bd9Sstevel@tonic-gate	    if [ -f "$SRCFILE" ]; then
2237c478bd9Sstevel@tonic-gate	         cp "$SRCFILE" y.tab.c
2247c478bd9Sstevel@tonic-gate	    fi
2257c478bd9Sstevel@tonic-gate	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
2267c478bd9Sstevel@tonic-gate	    if [ -f "$SRCFILE" ]; then
2277c478bd9Sstevel@tonic-gate	         cp "$SRCFILE" y.tab.h
2287c478bd9Sstevel@tonic-gate	    fi
2297c478bd9Sstevel@tonic-gate	  ;;
2307c478bd9Sstevel@tonic-gate	esac
2317c478bd9Sstevel@tonic-gate    fi
2327c478bd9Sstevel@tonic-gate    if [ ! -f y.tab.h ]; then
2337c478bd9Sstevel@tonic-gate	echo >y.tab.h
2347c478bd9Sstevel@tonic-gate    fi
2357c478bd9Sstevel@tonic-gate    if [ ! -f y.tab.c ]; then
2367c478bd9Sstevel@tonic-gate	echo 'main() { return 0; }' >y.tab.c
2377c478bd9Sstevel@tonic-gate    fi
2387c478bd9Sstevel@tonic-gate    ;;
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate  lex|flex)
2417c478bd9Sstevel@tonic-gate    echo 1>&2 "\
2427c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
2437c478bd9Sstevel@tonic-gate         you modified a \`.l' file.  You may need the \`Flex' package
2447c478bd9Sstevel@tonic-gate         in order for those modifications to take effect.  You can get
2457c478bd9Sstevel@tonic-gate         \`Flex' from any GNU archive site."
2467c478bd9Sstevel@tonic-gate    rm -f lex.yy.c
2477c478bd9Sstevel@tonic-gate    if [ $# -ne 1 ]; then
2487c478bd9Sstevel@tonic-gate        eval LASTARG="\${$#}"
2497c478bd9Sstevel@tonic-gate	case "$LASTARG" in
2507c478bd9Sstevel@tonic-gate	*.l)
2517c478bd9Sstevel@tonic-gate	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
2527c478bd9Sstevel@tonic-gate	    if [ -f "$SRCFILE" ]; then
2537c478bd9Sstevel@tonic-gate	         cp "$SRCFILE" lex.yy.c
2547c478bd9Sstevel@tonic-gate	    fi
2557c478bd9Sstevel@tonic-gate	  ;;
2567c478bd9Sstevel@tonic-gate	esac
2577c478bd9Sstevel@tonic-gate    fi
2587c478bd9Sstevel@tonic-gate    if [ ! -f lex.yy.c ]; then
2597c478bd9Sstevel@tonic-gate	echo 'main() { return 0; }' >lex.yy.c
2607c478bd9Sstevel@tonic-gate    fi
2617c478bd9Sstevel@tonic-gate    ;;
2627c478bd9Sstevel@tonic-gate
2637c478bd9Sstevel@tonic-gate  help2man)
2647c478bd9Sstevel@tonic-gate    echo 1>&2 "\
2657c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
2667c478bd9Sstevel@tonic-gate	 you modified a dependency of a manual page.  You may need the
2677c478bd9Sstevel@tonic-gate	 \`Help2man' package in order for those modifications to take
2687c478bd9Sstevel@tonic-gate	 effect.  You can get \`Help2man' from any GNU archive site."
2697c478bd9Sstevel@tonic-gate
2707c478bd9Sstevel@tonic-gate    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
2717c478bd9Sstevel@tonic-gate    if test -z "$file"; then
2727c478bd9Sstevel@tonic-gate	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
2737c478bd9Sstevel@tonic-gate    fi
2747c478bd9Sstevel@tonic-gate    if [ -f "$file" ]; then
2757c478bd9Sstevel@tonic-gate	touch $file
2767c478bd9Sstevel@tonic-gate    else
2777c478bd9Sstevel@tonic-gate	test -z "$file" || exec >$file
2787c478bd9Sstevel@tonic-gate	echo ".ab help2man is required to generate this page"
2797c478bd9Sstevel@tonic-gate	exit 1
2807c478bd9Sstevel@tonic-gate    fi
2817c478bd9Sstevel@tonic-gate    ;;
2827c478bd9Sstevel@tonic-gate
2837c478bd9Sstevel@tonic-gate  makeinfo)
2847c478bd9Sstevel@tonic-gate    echo 1>&2 "\
2857c478bd9Sstevel@tonic-gateWARNING: \`$1' is $msg.  You should only need it if
2867c478bd9Sstevel@tonic-gate         you modified a \`.texi' or \`.texinfo' file, or any other file
2877c478bd9Sstevel@tonic-gate         indirectly affecting the aspect of the manual.  The spurious
2887c478bd9Sstevel@tonic-gate         call might also be the consequence of using a buggy \`make' (AIX,
2897c478bd9Sstevel@tonic-gate         DU, IRIX).  You might want to install the \`Texinfo' package or
2907c478bd9Sstevel@tonic-gate         the \`GNU make' package.  Grab either from any GNU archive site."
2917c478bd9Sstevel@tonic-gate    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
2927c478bd9Sstevel@tonic-gate    if test -z "$file"; then
2937c478bd9Sstevel@tonic-gate      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
2947c478bd9Sstevel@tonic-gate      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
2957c478bd9Sstevel@tonic-gate    fi
2967c478bd9Sstevel@tonic-gate    touch $file
2977c478bd9Sstevel@tonic-gate    ;;
2987c478bd9Sstevel@tonic-gate
2997c478bd9Sstevel@tonic-gate  tar)
3007c478bd9Sstevel@tonic-gate    shift
3017c478bd9Sstevel@tonic-gate
3027c478bd9Sstevel@tonic-gate    # We have already tried tar in the generic part.
3037c478bd9Sstevel@tonic-gate    # Look for gnutar/gtar before invocation to avoid ugly error
3047c478bd9Sstevel@tonic-gate    # messages.
3057c478bd9Sstevel@tonic-gate    if (gnutar --version > /dev/null 2>&1); then
3067c478bd9Sstevel@tonic-gate       gnutar "$@" && exit 0
3077c478bd9Sstevel@tonic-gate    fi
3087c478bd9Sstevel@tonic-gate    if (gtar --version > /dev/null 2>&1); then
3097c478bd9Sstevel@tonic-gate       gtar "$@" && exit 0
3107c478bd9Sstevel@tonic-gate    fi
3117c478bd9Sstevel@tonic-gate    firstarg="$1"
3127c478bd9Sstevel@tonic-gate    if shift; then
3137c478bd9Sstevel@tonic-gate	case "$firstarg" in
3147c478bd9Sstevel@tonic-gate	*o*)
3157c478bd9Sstevel@tonic-gate	    firstarg=`echo "$firstarg" | sed s/o//`
3167c478bd9Sstevel@tonic-gate	    tar "$firstarg" "$@" && exit 0
3177c478bd9Sstevel@tonic-gate	    ;;
3187c478bd9Sstevel@tonic-gate	esac
3197c478bd9Sstevel@tonic-gate	case "$firstarg" in
3207c478bd9Sstevel@tonic-gate	*h*)
3217c478bd9Sstevel@tonic-gate	    firstarg=`echo "$firstarg" | sed s/h//`
3227c478bd9Sstevel@tonic-gate	    tar "$firstarg" "$@" && exit 0
3237c478bd9Sstevel@tonic-gate	    ;;
3247c478bd9Sstevel@tonic-gate	esac
3257c478bd9Sstevel@tonic-gate    fi
3267c478bd9Sstevel@tonic-gate
3277c478bd9Sstevel@tonic-gate    echo 1>&2 "\
3287c478bd9Sstevel@tonic-gateWARNING: I can't seem to be able to run \`tar' with the given arguments.
3297c478bd9Sstevel@tonic-gate         You may want to install GNU tar or Free paxutils, or check the
3307c478bd9Sstevel@tonic-gate         command line arguments."
3317c478bd9Sstevel@tonic-gate    exit 1
3327c478bd9Sstevel@tonic-gate    ;;
3337c478bd9Sstevel@tonic-gate
3347c478bd9Sstevel@tonic-gate  *)
3357c478bd9Sstevel@tonic-gate    echo 1>&2 "\
3367c478bd9Sstevel@tonic-gateWARNING: \`$1' is needed, and is $msg.
3377c478bd9Sstevel@tonic-gate         You might have modified some files without having the
3387c478bd9Sstevel@tonic-gate         proper tools for further handling them.  Check the \`README' file,
3397c478bd9Sstevel@tonic-gate         it often tells you about the needed prerequisites for installing
3407c478bd9Sstevel@tonic-gate         this package.  You may also peek at any GNU archive site, in case
3417c478bd9Sstevel@tonic-gate         some other package would contain this missing \`$1' program."
3427c478bd9Sstevel@tonic-gate    exit 1
3437c478bd9Sstevel@tonic-gate    ;;
3447c478bd9Sstevel@tonic-gateesac
3457c478bd9Sstevel@tonic-gate
3467c478bd9Sstevel@tonic-gateexit 0
3477c478bd9Sstevel@tonic-gate
3487c478bd9Sstevel@tonic-gate# Local variables:
3497c478bd9Sstevel@tonic-gate# eval: (add-hook 'write-file-hooks 'time-stamp)
3507c478bd9Sstevel@tonic-gate# time-stamp-start: "scriptversion="
3517c478bd9Sstevel@tonic-gate# time-stamp-format: "%:y-%02m-%02d.%02H"
3527c478bd9Sstevel@tonic-gate# time-stamp-end: "$"
3537c478bd9Sstevel@tonic-gate# End:
354