Deal with invokers who pass us environment variable settings as part
of the command they want us to run. Fixes part 3A of PR#14046
This commit is contained in:
parent
9b9300274d
commit
b27c418d40
@ -1,4 +1,4 @@
|
||||
# $NetBSD: genassym.sh,v 1.10 2001/03/06 02:20:18 cgd Exp $
|
||||
# $NetBSD: genassym.sh,v 1.11 2001/09/24 00:20:11 sommerfeld Exp $
|
||||
|
||||
#
|
||||
# Copyright (c) 1997 Matthias Pfaller.
|
||||
@ -35,13 +35,28 @@
|
||||
|
||||
awk=${AWK:-awk}
|
||||
|
||||
if [ $1 = '-c' ] ; then
|
||||
if [ "$1" = '-c' ] ; then
|
||||
shift
|
||||
ccode=1
|
||||
else
|
||||
ccode=0
|
||||
fi
|
||||
|
||||
# Deal with any leading environment settings..
|
||||
|
||||
while [ "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
*=*)
|
||||
eval export "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
trap "rm -f /tmp/$$.c /tmp/genassym.$$" 0 1 2 3 15
|
||||
|
||||
$awk '
|
||||
|
Loading…
Reference in New Issue
Block a user