Home | History | Annotate | Line # | Download | only in dist
missing revision 1.1.1.1.4.2
      1  1.1.1.1.4.2  yamt #! /bin/sh
      2  1.1.1.1.4.2  yamt # Common stub for a few missing GNU programs while installing.
      3  1.1.1.1.4.2  yamt 
      4  1.1.1.1.4.2  yamt scriptversion=2009-04-28.21; # UTC
      5  1.1.1.1.4.2  yamt 
      6  1.1.1.1.4.2  yamt # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
      7  1.1.1.1.4.2  yamt # 2008, 2009 Free Software Foundation, Inc.
      8  1.1.1.1.4.2  yamt # Originally by Fran,cois Pinard <pinard (at] iro.umontreal.ca>, 1996.
      9  1.1.1.1.4.2  yamt 
     10  1.1.1.1.4.2  yamt # This program is free software; you can redistribute it and/or modify
     11  1.1.1.1.4.2  yamt # it under the terms of the GNU General Public License as published by
     12  1.1.1.1.4.2  yamt # the Free Software Foundation; either version 2, or (at your option)
     13  1.1.1.1.4.2  yamt # any later version.
     14  1.1.1.1.4.2  yamt 
     15  1.1.1.1.4.2  yamt # This program is distributed in the hope that it will be useful,
     16  1.1.1.1.4.2  yamt # but WITHOUT ANY WARRANTY; without even the implied warranty of
     17  1.1.1.1.4.2  yamt # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18  1.1.1.1.4.2  yamt # GNU General Public License for more details.
     19  1.1.1.1.4.2  yamt 
     20  1.1.1.1.4.2  yamt # You should have received a copy of the GNU General Public License
     21  1.1.1.1.4.2  yamt # along with this program.  If not, see <http://www.gnu.org/licenses/>.
     22  1.1.1.1.4.2  yamt 
     23  1.1.1.1.4.2  yamt # As a special exception to the GNU General Public License, if you
     24  1.1.1.1.4.2  yamt # distribute this file as part of a program that contains a
     25  1.1.1.1.4.2  yamt # configuration script generated by Autoconf, you may include it under
     26  1.1.1.1.4.2  yamt # the same distribution terms that you use for the rest of that program.
     27  1.1.1.1.4.2  yamt 
     28  1.1.1.1.4.2  yamt if test $# -eq 0; then
     29  1.1.1.1.4.2  yamt   echo 1>&2 "Try \`$0 --help' for more information"
     30  1.1.1.1.4.2  yamt   exit 1
     31  1.1.1.1.4.2  yamt fi
     32  1.1.1.1.4.2  yamt 
     33  1.1.1.1.4.2  yamt run=:
     34  1.1.1.1.4.2  yamt sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
     35  1.1.1.1.4.2  yamt sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
     36  1.1.1.1.4.2  yamt 
     37  1.1.1.1.4.2  yamt # In the cases where this matters, `missing' is being run in the
     38  1.1.1.1.4.2  yamt # srcdir already.
     39  1.1.1.1.4.2  yamt if test -f configure.ac; then
     40  1.1.1.1.4.2  yamt   configure_ac=configure.ac
     41  1.1.1.1.4.2  yamt else
     42  1.1.1.1.4.2  yamt   configure_ac=configure.in
     43  1.1.1.1.4.2  yamt fi
     44  1.1.1.1.4.2  yamt 
     45  1.1.1.1.4.2  yamt msg="missing on your system"
     46  1.1.1.1.4.2  yamt 
     47  1.1.1.1.4.2  yamt case $1 in
     48  1.1.1.1.4.2  yamt --run)
     49  1.1.1.1.4.2  yamt   # Try to run requested program, and just exit if it succeeds.
     50  1.1.1.1.4.2  yamt   run=
     51  1.1.1.1.4.2  yamt   shift
     52  1.1.1.1.4.2  yamt   "$@" && exit 0
     53  1.1.1.1.4.2  yamt   # Exit code 63 means version mismatch.  This often happens
     54  1.1.1.1.4.2  yamt   # when the user try to use an ancient version of a tool on
     55  1.1.1.1.4.2  yamt   # a file that requires a minimum version.  In this case we
     56  1.1.1.1.4.2  yamt   # we should proceed has if the program had been absent, or
     57  1.1.1.1.4.2  yamt   # if --run hadn't been passed.
     58  1.1.1.1.4.2  yamt   if test $? = 63; then
     59  1.1.1.1.4.2  yamt     run=:
     60  1.1.1.1.4.2  yamt     msg="probably too old"
     61  1.1.1.1.4.2  yamt   fi
     62  1.1.1.1.4.2  yamt   ;;
     63  1.1.1.1.4.2  yamt 
     64  1.1.1.1.4.2  yamt   -h|--h|--he|--hel|--help)
     65  1.1.1.1.4.2  yamt     echo "\
     66  1.1.1.1.4.2  yamt $0 [OPTION]... PROGRAM [ARGUMENT]...
     67  1.1.1.1.4.2  yamt 
     68  1.1.1.1.4.2  yamt Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
     69  1.1.1.1.4.2  yamt error status if there is no known handling for PROGRAM.
     70  1.1.1.1.4.2  yamt 
     71  1.1.1.1.4.2  yamt Options:
     72  1.1.1.1.4.2  yamt   -h, --help      display this help and exit
     73  1.1.1.1.4.2  yamt   -v, --version   output version information and exit
     74  1.1.1.1.4.2  yamt   --run           try to run the given command, and emulate it if it fails
     75  1.1.1.1.4.2  yamt 
     76  1.1.1.1.4.2  yamt Supported PROGRAM values:
     77  1.1.1.1.4.2  yamt   aclocal      touch file \`aclocal.m4'
     78  1.1.1.1.4.2  yamt   autoconf     touch file \`configure'
     79  1.1.1.1.4.2  yamt   autoheader   touch file \`config.h.in'
     80  1.1.1.1.4.2  yamt   autom4te     touch the output file, or create a stub one
     81  1.1.1.1.4.2  yamt   automake     touch all \`Makefile.in' files
     82  1.1.1.1.4.2  yamt   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
     83  1.1.1.1.4.2  yamt   flex         create \`lex.yy.c', if possible, from existing .c
     84  1.1.1.1.4.2  yamt   help2man     touch the output file
     85  1.1.1.1.4.2  yamt   lex          create \`lex.yy.c', if possible, from existing .c
     86  1.1.1.1.4.2  yamt   makeinfo     touch the output file
     87  1.1.1.1.4.2  yamt   tar          try tar, gnutar, gtar, then tar without non-portable flags
     88  1.1.1.1.4.2  yamt   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
     89  1.1.1.1.4.2  yamt 
     90  1.1.1.1.4.2  yamt Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
     91  1.1.1.1.4.2  yamt \`g' are ignored when checking the name.
     92  1.1.1.1.4.2  yamt 
     93  1.1.1.1.4.2  yamt Send bug reports to <bug-automake@gnu.org>."
     94  1.1.1.1.4.2  yamt     exit $?
     95  1.1.1.1.4.2  yamt     ;;
     96  1.1.1.1.4.2  yamt 
     97  1.1.1.1.4.2  yamt   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
     98  1.1.1.1.4.2  yamt     echo "missing $scriptversion (GNU Automake)"
     99  1.1.1.1.4.2  yamt     exit $?
    100  1.1.1.1.4.2  yamt     ;;
    101  1.1.1.1.4.2  yamt 
    102  1.1.1.1.4.2  yamt   -*)
    103  1.1.1.1.4.2  yamt     echo 1>&2 "$0: Unknown \`$1' option"
    104  1.1.1.1.4.2  yamt     echo 1>&2 "Try \`$0 --help' for more information"
    105  1.1.1.1.4.2  yamt     exit 1
    106  1.1.1.1.4.2  yamt     ;;
    107  1.1.1.1.4.2  yamt 
    108  1.1.1.1.4.2  yamt esac
    109  1.1.1.1.4.2  yamt 
    110  1.1.1.1.4.2  yamt # normalize program name to check for.
    111  1.1.1.1.4.2  yamt program=`echo "$1" | sed '
    112  1.1.1.1.4.2  yamt   s/^gnu-//; t
    113  1.1.1.1.4.2  yamt   s/^gnu//; t
    114  1.1.1.1.4.2  yamt   s/^g//; t'`
    115  1.1.1.1.4.2  yamt 
    116  1.1.1.1.4.2  yamt # Now exit if we have it, but it failed.  Also exit now if we
    117  1.1.1.1.4.2  yamt # don't have it and --version was passed (most likely to detect
    118  1.1.1.1.4.2  yamt # the program).  This is about non-GNU programs, so use $1 not
    119  1.1.1.1.4.2  yamt # $program.
    120  1.1.1.1.4.2  yamt case $1 in
    121  1.1.1.1.4.2  yamt   lex*|yacc*)
    122  1.1.1.1.4.2  yamt     # Not GNU programs, they don't have --version.
    123  1.1.1.1.4.2  yamt     ;;
    124  1.1.1.1.4.2  yamt 
    125  1.1.1.1.4.2  yamt   tar*)
    126  1.1.1.1.4.2  yamt     if test -n "$run"; then
    127  1.1.1.1.4.2  yamt        echo 1>&2 "ERROR: \`tar' requires --run"
    128  1.1.1.1.4.2  yamt        exit 1
    129  1.1.1.1.4.2  yamt     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
    130  1.1.1.1.4.2  yamt        exit 1
    131  1.1.1.1.4.2  yamt     fi
    132  1.1.1.1.4.2  yamt     ;;
    133  1.1.1.1.4.2  yamt 
    134  1.1.1.1.4.2  yamt   *)
    135  1.1.1.1.4.2  yamt     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
    136  1.1.1.1.4.2  yamt        # We have it, but it failed.
    137  1.1.1.1.4.2  yamt        exit 1
    138  1.1.1.1.4.2  yamt     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
    139  1.1.1.1.4.2  yamt        # Could not run --version or --help.  This is probably someone
    140  1.1.1.1.4.2  yamt        # running `$TOOL --version' or `$TOOL --help' to check whether
    141  1.1.1.1.4.2  yamt        # $TOOL exists and not knowing $TOOL uses missing.
    142  1.1.1.1.4.2  yamt        exit 1
    143  1.1.1.1.4.2  yamt     fi
    144  1.1.1.1.4.2  yamt     ;;
    145  1.1.1.1.4.2  yamt esac
    146  1.1.1.1.4.2  yamt 
    147  1.1.1.1.4.2  yamt # If it does not exist, or fails to run (possibly an outdated version),
    148  1.1.1.1.4.2  yamt # try to emulate it.
    149  1.1.1.1.4.2  yamt case $program in
    150  1.1.1.1.4.2  yamt   aclocal*)
    151  1.1.1.1.4.2  yamt     echo 1>&2 "\
    152  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    153  1.1.1.1.4.2  yamt          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
    154  1.1.1.1.4.2  yamt          to install the \`Automake' and \`Perl' packages.  Grab them from
    155  1.1.1.1.4.2  yamt          any GNU archive site."
    156  1.1.1.1.4.2  yamt     touch aclocal.m4
    157  1.1.1.1.4.2  yamt     ;;
    158  1.1.1.1.4.2  yamt 
    159  1.1.1.1.4.2  yamt   autoconf*)
    160  1.1.1.1.4.2  yamt     echo 1>&2 "\
    161  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    162  1.1.1.1.4.2  yamt          you modified \`${configure_ac}'.  You might want to install the
    163  1.1.1.1.4.2  yamt          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
    164  1.1.1.1.4.2  yamt          archive site."
    165  1.1.1.1.4.2  yamt     touch configure
    166  1.1.1.1.4.2  yamt     ;;
    167  1.1.1.1.4.2  yamt 
    168  1.1.1.1.4.2  yamt   autoheader*)
    169  1.1.1.1.4.2  yamt     echo 1>&2 "\
    170  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    171  1.1.1.1.4.2  yamt          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
    172  1.1.1.1.4.2  yamt          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
    173  1.1.1.1.4.2  yamt          from any GNU archive site."
    174  1.1.1.1.4.2  yamt     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
    175  1.1.1.1.4.2  yamt     test -z "$files" && files="config.h"
    176  1.1.1.1.4.2  yamt     touch_files=
    177  1.1.1.1.4.2  yamt     for f in $files; do
    178  1.1.1.1.4.2  yamt       case $f in
    179  1.1.1.1.4.2  yamt       *:*) touch_files="$touch_files "`echo "$f" |
    180  1.1.1.1.4.2  yamt 				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
    181  1.1.1.1.4.2  yamt       *) touch_files="$touch_files $f.in";;
    182  1.1.1.1.4.2  yamt       esac
    183  1.1.1.1.4.2  yamt     done
    184  1.1.1.1.4.2  yamt     touch $touch_files
    185  1.1.1.1.4.2  yamt     ;;
    186  1.1.1.1.4.2  yamt 
    187  1.1.1.1.4.2  yamt   automake*)
    188  1.1.1.1.4.2  yamt     echo 1>&2 "\
    189  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    190  1.1.1.1.4.2  yamt          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
    191  1.1.1.1.4.2  yamt          You might want to install the \`Automake' and \`Perl' packages.
    192  1.1.1.1.4.2  yamt          Grab them from any GNU archive site."
    193  1.1.1.1.4.2  yamt     find . -type f -name Makefile.am -print |
    194  1.1.1.1.4.2  yamt 	   sed 's/\.am$/.in/' |
    195  1.1.1.1.4.2  yamt 	   while read f; do touch "$f"; done
    196  1.1.1.1.4.2  yamt     ;;
    197  1.1.1.1.4.2  yamt 
    198  1.1.1.1.4.2  yamt   autom4te*)
    199  1.1.1.1.4.2  yamt     echo 1>&2 "\
    200  1.1.1.1.4.2  yamt WARNING: \`$1' is needed, but is $msg.
    201  1.1.1.1.4.2  yamt          You might have modified some files without having the
    202  1.1.1.1.4.2  yamt          proper tools for further handling them.
    203  1.1.1.1.4.2  yamt          You can get \`$1' as part of \`Autoconf' from any GNU
    204  1.1.1.1.4.2  yamt          archive site."
    205  1.1.1.1.4.2  yamt 
    206  1.1.1.1.4.2  yamt     file=`echo "$*" | sed -n "$sed_output"`
    207  1.1.1.1.4.2  yamt     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    208  1.1.1.1.4.2  yamt     if test -f "$file"; then
    209  1.1.1.1.4.2  yamt 	touch $file
    210  1.1.1.1.4.2  yamt     else
    211  1.1.1.1.4.2  yamt 	test -z "$file" || exec >$file
    212  1.1.1.1.4.2  yamt 	echo "#! /bin/sh"
    213  1.1.1.1.4.2  yamt 	echo "# Created by GNU Automake missing as a replacement of"
    214  1.1.1.1.4.2  yamt 	echo "#  $ $@"
    215  1.1.1.1.4.2  yamt 	echo "exit 0"
    216  1.1.1.1.4.2  yamt 	chmod +x $file
    217  1.1.1.1.4.2  yamt 	exit 1
    218  1.1.1.1.4.2  yamt     fi
    219  1.1.1.1.4.2  yamt     ;;
    220  1.1.1.1.4.2  yamt 
    221  1.1.1.1.4.2  yamt   bison*|yacc*)
    222  1.1.1.1.4.2  yamt     echo 1>&2 "\
    223  1.1.1.1.4.2  yamt WARNING: \`$1' $msg.  You should only need it if
    224  1.1.1.1.4.2  yamt          you modified a \`.y' file.  You may need the \`Bison' package
    225  1.1.1.1.4.2  yamt          in order for those modifications to take effect.  You can get
    226  1.1.1.1.4.2  yamt          \`Bison' from any GNU archive site."
    227  1.1.1.1.4.2  yamt     rm -f y.tab.c y.tab.h
    228  1.1.1.1.4.2  yamt     if test $# -ne 1; then
    229  1.1.1.1.4.2  yamt         eval LASTARG="\${$#}"
    230  1.1.1.1.4.2  yamt 	case $LASTARG in
    231  1.1.1.1.4.2  yamt 	*.y)
    232  1.1.1.1.4.2  yamt 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
    233  1.1.1.1.4.2  yamt 	    if test -f "$SRCFILE"; then
    234  1.1.1.1.4.2  yamt 	         cp "$SRCFILE" y.tab.c
    235  1.1.1.1.4.2  yamt 	    fi
    236  1.1.1.1.4.2  yamt 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
    237  1.1.1.1.4.2  yamt 	    if test -f "$SRCFILE"; then
    238  1.1.1.1.4.2  yamt 	         cp "$SRCFILE" y.tab.h
    239  1.1.1.1.4.2  yamt 	    fi
    240  1.1.1.1.4.2  yamt 	  ;;
    241  1.1.1.1.4.2  yamt 	esac
    242  1.1.1.1.4.2  yamt     fi
    243  1.1.1.1.4.2  yamt     if test ! -f y.tab.h; then
    244  1.1.1.1.4.2  yamt 	echo >y.tab.h
    245  1.1.1.1.4.2  yamt     fi
    246  1.1.1.1.4.2  yamt     if test ! -f y.tab.c; then
    247  1.1.1.1.4.2  yamt 	echo 'main() { return 0; }' >y.tab.c
    248  1.1.1.1.4.2  yamt     fi
    249  1.1.1.1.4.2  yamt     ;;
    250  1.1.1.1.4.2  yamt 
    251  1.1.1.1.4.2  yamt   lex*|flex*)
    252  1.1.1.1.4.2  yamt     echo 1>&2 "\
    253  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    254  1.1.1.1.4.2  yamt          you modified a \`.l' file.  You may need the \`Flex' package
    255  1.1.1.1.4.2  yamt          in order for those modifications to take effect.  You can get
    256  1.1.1.1.4.2  yamt          \`Flex' from any GNU archive site."
    257  1.1.1.1.4.2  yamt     rm -f lex.yy.c
    258  1.1.1.1.4.2  yamt     if test $# -ne 1; then
    259  1.1.1.1.4.2  yamt         eval LASTARG="\${$#}"
    260  1.1.1.1.4.2  yamt 	case $LASTARG in
    261  1.1.1.1.4.2  yamt 	*.l)
    262  1.1.1.1.4.2  yamt 	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
    263  1.1.1.1.4.2  yamt 	    if test -f "$SRCFILE"; then
    264  1.1.1.1.4.2  yamt 	         cp "$SRCFILE" lex.yy.c
    265  1.1.1.1.4.2  yamt 	    fi
    266  1.1.1.1.4.2  yamt 	  ;;
    267  1.1.1.1.4.2  yamt 	esac
    268  1.1.1.1.4.2  yamt     fi
    269  1.1.1.1.4.2  yamt     if test ! -f lex.yy.c; then
    270  1.1.1.1.4.2  yamt 	echo 'main() { return 0; }' >lex.yy.c
    271  1.1.1.1.4.2  yamt     fi
    272  1.1.1.1.4.2  yamt     ;;
    273  1.1.1.1.4.2  yamt 
    274  1.1.1.1.4.2  yamt   help2man*)
    275  1.1.1.1.4.2  yamt     echo 1>&2 "\
    276  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    277  1.1.1.1.4.2  yamt 	 you modified a dependency of a manual page.  You may need the
    278  1.1.1.1.4.2  yamt 	 \`Help2man' package in order for those modifications to take
    279  1.1.1.1.4.2  yamt 	 effect.  You can get \`Help2man' from any GNU archive site."
    280  1.1.1.1.4.2  yamt 
    281  1.1.1.1.4.2  yamt     file=`echo "$*" | sed -n "$sed_output"`
    282  1.1.1.1.4.2  yamt     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    283  1.1.1.1.4.2  yamt     if test -f "$file"; then
    284  1.1.1.1.4.2  yamt 	touch $file
    285  1.1.1.1.4.2  yamt     else
    286  1.1.1.1.4.2  yamt 	test -z "$file" || exec >$file
    287  1.1.1.1.4.2  yamt 	echo ".ab help2man is required to generate this page"
    288  1.1.1.1.4.2  yamt 	exit $?
    289  1.1.1.1.4.2  yamt     fi
    290  1.1.1.1.4.2  yamt     ;;
    291  1.1.1.1.4.2  yamt 
    292  1.1.1.1.4.2  yamt   makeinfo*)
    293  1.1.1.1.4.2  yamt     echo 1>&2 "\
    294  1.1.1.1.4.2  yamt WARNING: \`$1' is $msg.  You should only need it if
    295  1.1.1.1.4.2  yamt          you modified a \`.texi' or \`.texinfo' file, or any other file
    296  1.1.1.1.4.2  yamt          indirectly affecting the aspect of the manual.  The spurious
    297  1.1.1.1.4.2  yamt          call might also be the consequence of using a buggy \`make' (AIX,
    298  1.1.1.1.4.2  yamt          DU, IRIX).  You might want to install the \`Texinfo' package or
    299  1.1.1.1.4.2  yamt          the \`GNU make' package.  Grab either from any GNU archive site."
    300  1.1.1.1.4.2  yamt     # The file to touch is that specified with -o ...
    301  1.1.1.1.4.2  yamt     file=`echo "$*" | sed -n "$sed_output"`
    302  1.1.1.1.4.2  yamt     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    303  1.1.1.1.4.2  yamt     if test -z "$file"; then
    304  1.1.1.1.4.2  yamt       # ... or it is the one specified with @setfilename ...
    305  1.1.1.1.4.2  yamt       infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
    306  1.1.1.1.4.2  yamt       file=`sed -n '
    307  1.1.1.1.4.2  yamt 	/^@setfilename/{
    308  1.1.1.1.4.2  yamt 	  s/.* \([^ ]*\) *$/\1/
    309  1.1.1.1.4.2  yamt 	  p
    310  1.1.1.1.4.2  yamt 	  q
    311  1.1.1.1.4.2  yamt 	}' $infile`
    312  1.1.1.1.4.2  yamt       # ... or it is derived from the source name (dir/f.texi becomes f.info)
    313  1.1.1.1.4.2  yamt       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
    314  1.1.1.1.4.2  yamt     fi
    315  1.1.1.1.4.2  yamt     # If the file does not exist, the user really needs makeinfo;
    316  1.1.1.1.4.2  yamt     # let's fail without touching anything.
    317  1.1.1.1.4.2  yamt     test -f $file || exit 1
    318  1.1.1.1.4.2  yamt     touch $file
    319  1.1.1.1.4.2  yamt     ;;
    320  1.1.1.1.4.2  yamt 
    321  1.1.1.1.4.2  yamt   tar*)
    322  1.1.1.1.4.2  yamt     shift
    323  1.1.1.1.4.2  yamt 
    324  1.1.1.1.4.2  yamt     # We have already tried tar in the generic part.
    325  1.1.1.1.4.2  yamt     # Look for gnutar/gtar before invocation to avoid ugly error
    326  1.1.1.1.4.2  yamt     # messages.
    327  1.1.1.1.4.2  yamt     if (gnutar --version > /dev/null 2>&1); then
    328  1.1.1.1.4.2  yamt        gnutar "$@" && exit 0
    329  1.1.1.1.4.2  yamt     fi
    330  1.1.1.1.4.2  yamt     if (gtar --version > /dev/null 2>&1); then
    331  1.1.1.1.4.2  yamt        gtar "$@" && exit 0
    332  1.1.1.1.4.2  yamt     fi
    333  1.1.1.1.4.2  yamt     firstarg="$1"
    334  1.1.1.1.4.2  yamt     if shift; then
    335  1.1.1.1.4.2  yamt 	case $firstarg in
    336  1.1.1.1.4.2  yamt 	*o*)
    337  1.1.1.1.4.2  yamt 	    firstarg=`echo "$firstarg" | sed s/o//`
    338  1.1.1.1.4.2  yamt 	    tar "$firstarg" "$@" && exit 0
    339  1.1.1.1.4.2  yamt 	    ;;
    340  1.1.1.1.4.2  yamt 	esac
    341  1.1.1.1.4.2  yamt 	case $firstarg in
    342  1.1.1.1.4.2  yamt 	*h*)
    343  1.1.1.1.4.2  yamt 	    firstarg=`echo "$firstarg" | sed s/h//`
    344  1.1.1.1.4.2  yamt 	    tar "$firstarg" "$@" && exit 0
    345  1.1.1.1.4.2  yamt 	    ;;
    346  1.1.1.1.4.2  yamt 	esac
    347  1.1.1.1.4.2  yamt     fi
    348  1.1.1.1.4.2  yamt 
    349  1.1.1.1.4.2  yamt     echo 1>&2 "\
    350  1.1.1.1.4.2  yamt WARNING: I can't seem to be able to run \`tar' with the given arguments.
    351  1.1.1.1.4.2  yamt          You may want to install GNU tar or Free paxutils, or check the
    352  1.1.1.1.4.2  yamt          command line arguments."
    353  1.1.1.1.4.2  yamt     exit 1
    354  1.1.1.1.4.2  yamt     ;;
    355  1.1.1.1.4.2  yamt 
    356  1.1.1.1.4.2  yamt   *)
    357  1.1.1.1.4.2  yamt     echo 1>&2 "\
    358  1.1.1.1.4.2  yamt WARNING: \`$1' is needed, and is $msg.
    359  1.1.1.1.4.2  yamt          You might have modified some files without having the
    360  1.1.1.1.4.2  yamt          proper tools for further handling them.  Check the \`README' file,
    361  1.1.1.1.4.2  yamt          it often tells you about the needed prerequisites for installing
    362  1.1.1.1.4.2  yamt          this package.  You may also peek at any GNU archive site, in case
    363  1.1.1.1.4.2  yamt          some other package would contain this missing \`$1' program."
    364  1.1.1.1.4.2  yamt     exit 1
    365  1.1.1.1.4.2  yamt     ;;
    366  1.1.1.1.4.2  yamt esac
    367  1.1.1.1.4.2  yamt 
    368  1.1.1.1.4.2  yamt exit 0
    369  1.1.1.1.4.2  yamt 
    370  1.1.1.1.4.2  yamt # Local variables:
    371  1.1.1.1.4.2  yamt # eval: (add-hook 'write-file-hooks 'time-stamp)
    372  1.1.1.1.4.2  yamt # time-stamp-start: "scriptversion="
    373  1.1.1.1.4.2  yamt # time-stamp-format: "%:y-%02m-%02d.%02H"
    374  1.1.1.1.4.2  yamt # time-stamp-time-zone: "UTC"
    375  1.1.1.1.4.2  yamt # time-stamp-end: "; # UTC"
    376  1.1.1.1.4.2  yamt # End:
    377