[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: do not use $status in aux scripts
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: do not use $status in aux scripts |
Date: |
Fri, 10 Sep 2004 20:46:27 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I'm installing this on HEAD and branch-1-9.
2004-09-10 Alexandre Duret-Lutz <address@hidden>
* lib/compile, lib/elisp-comp, lib/install-sh, lib/ylwrap: Use $ret
instead of $status which is read-only in Zsh.
Index: lib/compile
===================================================================
RCS file: /cvs/automake/automake/lib/compile,v
retrieving revision 1.7.4.1
diff -u -r1.7.4.1 compile
--- lib/compile 10 Sep 2004 18:38:33 -0000 1.7.4.1
+++ lib/compile 10 Sep 2004 18:45:03 -0000
@@ -121,14 +121,14 @@
# Run the compile.
"$@"
-status=$?
+ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir "$lockdir"
-exit $status
+exit $ret
# Local Variables:
# mode: shell-script
Index: lib/elisp-comp
===================================================================
RCS file: /cvs/automake/automake/lib/elisp-comp,v
retrieving revision 1.10
diff -u -r1.10 elisp-comp
--- lib/elisp-comp 9 Nov 2003 00:10:50 -0000 1.10
+++ lib/elisp-comp 10 Sep 2004 18:45:03 -0000
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1995, 2000, 2003, 2004 Free Software Foundation, Inc.
-scriptversion=2003-11-08.23
+scriptversion=2004-09-10.20
# Franc,ois Pinard <address@hidden>, 1995.
#
@@ -64,7 +64,7 @@
tempdir=elc.$$
# Cleanup the temporary directory on exit.
-trap 'status=$?; rm -rf "$tempdir" && exit $status' 0
+trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
mkdir $tempdir
Index: lib/install-sh
===================================================================
RCS file: /cvs/automake/automake/lib/install-sh,v
retrieving revision 1.19
diff -u -r1.19 install-sh
--- lib/install-sh 5 Jul 2004 07:07:32 -0000 1.19
+++ lib/install-sh 10 Sep 2004 18:45:03 -0000
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2004-07-05.00
+scriptversion=2004-09-10.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -260,7 +260,7 @@
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
- trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
Index: lib/ylwrap
===================================================================
RCS file: /cvs/automake/automake/lib/ylwrap,v
retrieving revision 1.24
diff -u -r1.24 ylwrap
--- lib/ylwrap 18 Nov 2003 20:06:43 -0000 1.24
+++ lib/ylwrap 10 Sep 2004 18:45:03 -0000
@@ -1,9 +1,9 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-scriptversion=2003-11-18.20
+scriptversion=2004-09-10.20
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# Written by Tom Tromey <address@hidden>.
@@ -109,9 +109,9 @@
0) $prog "$input" ;;
*) $prog "$@" "$input" ;;
esac
-status=$?
+ret=$?
-if test $status -eq 0; then
+if test $ret -eq 0; then
set X $pairlist
shift
first=yes
@@ -177,7 +177,7 @@
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
- -e "s,$FROM,$TARGET," "$from" >"$target" || status=$?
+ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
# Check whether header files must be updated.
if test $first = no; then
@@ -195,7 +195,7 @@
# is not specified, we don't want an error when the header
# file is "missing".
if test $first = yes; then
- status=1
+ ret=1
fi
fi
shift
@@ -203,14 +203,14 @@
first=no
done
else
- status=$?
+ ret=$?
fi
# Remove the directory.
cd ..
rm -rf $dirname
-exit $status
+exit $ret
# Local Variables:
# mode: shell-script
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: do not use $status in aux scripts,
Alexandre Duret-Lutz <=