diff options
author | Pedro Giffuni <pfg@apache.org> | 2012-01-24 14:30:34 +0000 |
---|---|---|
committer | Pedro Giffuni <pfg@apache.org> | 2012-01-24 14:30:34 +0000 |
commit | a345457686b7617dcdee9d28b2a579801e90034a (patch) | |
tree | ab2f742ce9cb74240a14f2c650ac0693491a1984 /soltools/testhxx | |
parent | f2a7b1334f97ab8bface5ede756bce51cf2426da (diff) |
Avoid some uses of non portable #!/bin/bash in shell scripts.
bash is common in GNU/linux but is, in general, not
available by default on other systems or likely to
be in a different place. When possible /bin/sh
should be used but if bash extensions are required
"#!/bin/env bash" is considered more portable.
Diffstat (limited to 'soltools/testhxx')
-rw-r--r-- | soltools/testhxx/create.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/soltools/testhxx/create.pl b/soltools/testhxx/create.pl index 724aec0294f7..940d2f197439 100644 --- a/soltools/testhxx/create.pl +++ b/soltools/testhxx/create.pl @@ -32,7 +32,7 @@ if ($ENV{OS} eq 'LINUX') { $in =~ s!\s+-o\s*\S+! -o /dev/null! || die 'bad input: no -o'; $in =~ s!\S+/testhxx.cxx!-x c++ /proc/self/fd/0! || die 'bad input: no source file'; - print STDOUT '#!/bin/bash', "\n"; + print STDOUT '#!/bin/sh', "\n"; print STDOUT $in, ' <<<"#include \\"`echo $(if [ ${1%/*} != $1 ];then cd ${1%/*};fi;', '/bin/pwd)/${1##*/}`\\""', "\n"; |