38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#! /bin/sh
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# Common stub for a few missing GNU programs while installing.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# This program is free software; you can redistribute it and/or modify
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# it under the terms of the GNU General Public License as published by
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# the Free Software Foundation; either version 2, or (at your option)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# any later version.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# This program is distributed in the hope that it will be useful,
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# but WITHOUT ANY WARRANTY; without even the implied warranty of
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# GNU General Public License for more details.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# You should have received a copy of the GNU General Public License
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# along with this program; if not, write to the Free Software
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# 02111-1307, USA.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# As a special exception to the GNU General Public License, if you
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# distribute this file as part of a program that contains a
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# configuration script generated by Autoconf, you may include it under
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# the same distribution terms that you use for the rest of that program.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncif test $# -eq 0; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "Try \`$0 --help' for more information"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncfi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncrun=:
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# In the cases where this matters, `missing' is being run in the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# srcdir already.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncif test -f configure.ac; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync configure_ac=configure.ac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncelse
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync configure_ac=configure.in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncfi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsynccase "$1" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync--run)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # Try to run requested program, and just exit if it succeeds.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync run=
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync shift
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync "$@" && exit 0
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncesac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# If it does not exist, or fails to run (possibly an outdated version),
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# try to emulate it.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsynccase "$1" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync -h|--h|--he|--hel|--help)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync$0 [OPTION]... PROGRAM [ARGUMENT]...
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncHandle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncerror status if there is no known handling for PROGRAM.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncOptions:
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync -h, --help display this help and exit
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync -v, --version output version information and exit
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync --run try to run the given command, and emulate it if it fails
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncSupported PROGRAM values:
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync aclocal touch file \`aclocal.m4'
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync autoconf touch file \`configure'
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync autoheader touch file \`config.h.in'
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync automake touch all \`Makefile.in' files
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync bison create \`y.tab.[ch]', if possible, from existing .[ch]
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync flex create \`lex.yy.c', if possible, from existing .c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync help2man touch the output file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync lex create \`lex.yy.c', if possible, from existing .c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync makeinfo touch the output file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync tar try tar, gnutar, gtar, then tar without non-portable flags
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo "missing 0.4 - GNU automake"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync -*)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "$0: Unknown \`$1' option"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "Try \`$0 --help' for more information"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync aclocal*)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have it, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified \`acinclude.m4' or \`${configure_ac}'. You might want
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync to install the \`Automake' and \`Perl' packages. Grab them from
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch aclocal.m4
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync autoconf)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have it, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified \`${configure_ac}'. You might want to install the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch configure
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync autoheader)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have it, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified \`acconfig.h' or \`${configure_ac}'. You might want
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync to install the \`Autoconf' and \`GNU m4' packages. Grab them
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync from any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync test -z "$files" && files="config.h"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch_files=
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync for f in $files; do
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync case "$f" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *:*) touch_files="$touch_files "`echo "$f" |
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync sed -e 's/^[^:]*://' -e 's/:.*//'`;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *) touch_files="$touch_files $f.in";;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync esac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync done
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch $touch_files
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync automake*)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have it, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync You might want to install the \`Automake' and \`Perl' packages.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync Grab them from any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync find . -type f -name Makefile.am -print |
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync sed 's/\.am$/.in/' |
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync while read f; do touch "$f"; done
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync autom4te)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have it, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is needed, and you do not seem to have it handy on your
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync system. You might have modified some files without having the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync proper tools for further handling them.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync You can get \`$1Help2man' as part of \`Autoconf' from any GNU
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -f "$file"; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch $file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync else
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync test -z "$file" || exec >$file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo "#! /bin/sh"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo "# Created by GNU Automake missing as a replacement of"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo "# $ $@"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo "exit 0"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync chmod +x $file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync bison|yacc)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified a \`.y' file. You may need the \`Bison' package
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync in order for those modifications to take effect. You can get
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync \`Bison' from any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rm -f y.tab.c y.tab.h
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ $# -ne 1 ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync eval LASTARG="\${$#}"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync case "$LASTARG" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *.y)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ -f "$SRCFILE" ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync cp "$SRCFILE" y.tab.c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ -f "$SRCFILE" ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync cp "$SRCFILE" y.tab.h
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync esac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ ! -f y.tab.h ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo >y.tab.h
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ ! -f y.tab.c ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 'main() { return 0; }' >y.tab.c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync lex|flex)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified a \`.l' file. You may need the \`Flex' package
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync in order for those modifications to take effect. You can get
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync \`Flex' from any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rm -f lex.yy.c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ $# -ne 1 ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync eval LASTARG="\${$#}"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync case "$LASTARG" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *.l)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ -f "$SRCFILE" ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync cp "$SRCFILE" lex.yy.c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync esac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ ! -f lex.yy.c ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 'main() { return 0; }' >lex.yy.c
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync help2man)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have it, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified a dependency of a manual page. You may need the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync \`Help2man' package in order for those modifications to take
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync effect. You can get \`Help2man' from any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$file"; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if [ -f "$file" ]; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch $file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync else
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync test -z "$file" || exec >$file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo ".ab help2man is required to generate this page"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync makeinfo)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have makeinfo, but it failed.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is missing on your system. You should only need it if
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync you modified a \`.texi' or \`.texinfo' file, or any other file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync indirectly affecting the aspect of the manual. The spurious
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync call might also be the consequence of using a buggy \`make' (AIX,
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync DU, IRIX). You might want to install the \`Texinfo' package or
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync the \`GNU make' package. Grab either from any GNU archive site."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -z "$file"; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync touch $file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync tar)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync shift
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if test -n "$run"; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "ERROR: \`tar' requires --run"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # We have already tried tar in the generic part.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # Look for gnutar/gtar before invocation to avoid ugly error
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync # messages.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if (gnutar --version > /dev/null 2>&1); then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync gnutar "$@" && exit 0
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if (gtar --version > /dev/null 2>&1); then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync gtar "$@" && exit 0
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync firstarg="$1"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync if shift; then
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync case "$firstarg" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *o*)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync firstarg=`echo "$firstarg" | sed s/o//`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync tar "$firstarg" "$@" && exit 0
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync esac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync case "$firstarg" in
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *h*)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync firstarg=`echo "$firstarg" | sed s/h//`
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync tar "$firstarg" "$@" && exit 0
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync esac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync fi
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: I can't seem to be able to run \`tar' with the given arguments.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync You may want to install GNU tar or Free paxutils, or check the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync command line arguments."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync *)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync echo 1>&2 "\
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncWARNING: \`$1' is needed, and you do not seem to have it handy on your
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync system. You might have modified some files without having the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync proper tools for further handling them. Check the \`README' file,
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync it often tells you about the needed prerequirements for installing
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync this package. You may also peek at any GNU archive site, in case
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync some other package would contain this missing \`$1' program."
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exit 1
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ;;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncesac
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncexit 0