X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Finstmany.sh;h=0a479cc308a30b89cfc62463c30c4dabae1b4b9f;hb=a7c00e1935726a32dca6871dd0f1b7eda28d0a5b;hp=64005179c7db5fce85a4f1abbfaa3583be0b5e94;hpb=b8c7e3f7ebf3ff8841b6bc1d224bbc87d71261ff;p=platform%2Fupstream%2Fautomake.git diff --git a/t/instmany.sh b/t/instmany.sh old mode 100755 new mode 100644 index 6400517..0a479cc --- a/t/instmany.sh +++ b/t/instmany.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2008-2012 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,26 +38,35 @@ subdir=long_subdir_name_with_many_characters nfiles=81 list=$(seq_ 1 $nfiles) -sed "s|@limit@|$limit|g" >myinstall.in <<'END' +oPATH=$PATH; export oPATH +nPATH=$(pwd)/x-bin$PATH_SEPARATOR$PATH; export nPATH + +mkdir x-bin + +sed "s|@limit@|$limit|g" >x-bin/my-install <<'END' #! /bin/sh # Fake install script. This doesn't really install # (the INSTALL path below would be wrong outside this directory). limit=@limit@ -INSTALL='@INSTALL@' -len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit` +PATH=$oPATH; export PATH +if test -z "$orig_INSTALL"; then + echo "$0: \$orig_INSTALL variable not set" >&2 + exit 1 +fi +len=`expr "$orig_INSTALL $*" : ".*" 2>/dev/null || echo $limit` if test $len -ge $limit; then echo "$0: safe command line limit of $limit characters exceeded" >&2 exit 1 fi -exit 0 +exec $orig_INSTALL "$@" +exit 1 END # Creative quoting in the next line to please maintainer-check. -sed "s|@limit@|$limit|g" >'rm' <<'END' +sed "s|@limit@|$limit|g" >x-bin/'rm' <<'END' #! /bin/sh limit=@limit@ -PATH=$save_PATH -export PATH +PATH=$oPATH; export PATH RM='rm -f' len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit` if test $len -ge $limit; then @@ -68,10 +77,15 @@ exec $RM "$@" exit 1 END -chmod +x rm +# Creative quoting in the next line to please maintainer-check. +chmod +x x-bin/'rm' x-bin/my-install + +cat > setenv.in <<'END' +orig_INSTALL='@INSTALL@'; export orig_INSTALL +END cat >>configure.ac <