comparison missing @ 1826:6a621a625b04

New release
author Adam Chlipala <adam@chlipala.net>
date Tue, 25 Sep 2012 08:16:58 -0400
parents 27d68ccb2c9e
children
comparison
equal deleted inserted replaced
1825:52c291b05738 1826:6a621a625b04
1 #! /bin/sh 1 #! /bin/sh
2 # Common stub for a few missing GNU programs while installing. 2 # Common stub for a few missing GNU programs while installing.
3 3
4 scriptversion=2012-01-06.13; # UTC 4 scriptversion=2009-04-28.21; # UTC
5 5
6 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 6 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
7 # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. 7 # 2008, 2009 Free Software Foundation, Inc.
8 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. 8 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9 9
10 # This program is free software; you can redistribute it and/or modify 10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by 11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2, or (at your option) 12 # the Free Software Foundation; either version 2, or (at your option)
82 bison create \`y.tab.[ch]', if possible, from existing .[ch] 82 bison create \`y.tab.[ch]', if possible, from existing .[ch]
83 flex create \`lex.yy.c', if possible, from existing .c 83 flex create \`lex.yy.c', if possible, from existing .c
84 help2man touch the output file 84 help2man touch the output file
85 lex create \`lex.yy.c', if possible, from existing .c 85 lex create \`lex.yy.c', if possible, from existing .c
86 makeinfo touch the output file 86 makeinfo touch the output file
87 tar try tar, gnutar, gtar, then tar without non-portable flags
87 yacc create \`y.tab.[ch]', if possible, from existing .[ch] 88 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
88 89
89 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and 90 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
90 \`g' are ignored when checking the name. 91 \`g' are ignored when checking the name.
91 92
117 # the program). This is about non-GNU programs, so use $1 not 118 # the program). This is about non-GNU programs, so use $1 not
118 # $program. 119 # $program.
119 case $1 in 120 case $1 in
120 lex*|yacc*) 121 lex*|yacc*)
121 # Not GNU programs, they don't have --version. 122 # Not GNU programs, they don't have --version.
123 ;;
124
125 tar*)
126 if test -n "$run"; then
127 echo 1>&2 "ERROR: \`tar' requires --run"
128 exit 1
129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130 exit 1
131 fi
122 ;; 132 ;;
123 133
124 *) 134 *)
125 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 135 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
126 # We have it, but it failed. 136 # We have it, but it failed.
214 you modified a \`.y' file. You may need the \`Bison' package 224 you modified a \`.y' file. You may need the \`Bison' package
215 in order for those modifications to take effect. You can get 225 in order for those modifications to take effect. You can get
216 \`Bison' from any GNU archive site." 226 \`Bison' from any GNU archive site."
217 rm -f y.tab.c y.tab.h 227 rm -f y.tab.c y.tab.h
218 if test $# -ne 1; then 228 if test $# -ne 1; then
219 eval LASTARG=\${$#} 229 eval LASTARG="\${$#}"
220 case $LASTARG in 230 case $LASTARG in
221 *.y) 231 *.y)
222 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` 232 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
223 if test -f "$SRCFILE"; then 233 if test -f "$SRCFILE"; then
224 cp "$SRCFILE" y.tab.c 234 cp "$SRCFILE" y.tab.c
244 you modified a \`.l' file. You may need the \`Flex' package 254 you modified a \`.l' file. You may need the \`Flex' package
245 in order for those modifications to take effect. You can get 255 in order for those modifications to take effect. You can get
246 \`Flex' from any GNU archive site." 256 \`Flex' from any GNU archive site."
247 rm -f lex.yy.c 257 rm -f lex.yy.c
248 if test $# -ne 1; then 258 if test $# -ne 1; then
249 eval LASTARG=\${$#} 259 eval LASTARG="\${$#}"
250 case $LASTARG in 260 case $LASTARG in
251 *.l) 261 *.l)
252 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` 262 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
253 if test -f "$SRCFILE"; then 263 if test -f "$SRCFILE"; then
254 cp "$SRCFILE" lex.yy.c 264 cp "$SRCFILE" lex.yy.c
306 # let's fail without touching anything. 316 # let's fail without touching anything.
307 test -f $file || exit 1 317 test -f $file || exit 1
308 touch $file 318 touch $file
309 ;; 319 ;;
310 320
321 tar*)
322 shift
323
324 # We have already tried tar in the generic part.
325 # Look for gnutar/gtar before invocation to avoid ugly error
326 # messages.
327 if (gnutar --version > /dev/null 2>&1); then
328 gnutar "$@" && exit 0
329 fi
330 if (gtar --version > /dev/null 2>&1); then
331 gtar "$@" && exit 0
332 fi
333 firstarg="$1"
334 if shift; then
335 case $firstarg in
336 *o*)
337 firstarg=`echo "$firstarg" | sed s/o//`
338 tar "$firstarg" "$@" && exit 0
339 ;;
340 esac
341 case $firstarg in
342 *h*)
343 firstarg=`echo "$firstarg" | sed s/h//`
344 tar "$firstarg" "$@" && exit 0
345 ;;
346 esac
347 fi
348
349 echo 1>&2 "\
350 WARNING: I can't seem to be able to run \`tar' with the given arguments.
351 You may want to install GNU tar or Free paxutils, or check the
352 command line arguments."
353 exit 1
354 ;;
355
311 *) 356 *)
312 echo 1>&2 "\ 357 echo 1>&2 "\
313 WARNING: \`$1' is needed, and is $msg. 358 WARNING: \`$1' is needed, and is $msg.
314 You might have modified some files without having the 359 You might have modified some files without having the
315 proper tools for further handling them. Check the \`README' file, 360 proper tools for further handling them. Check the \`README' file,