History

Remove bashisms from scripts

The '-e' option to echo and brace expansion are not guaranteed to be supported by a POSIX-compliant /bin/sh (e.g. dash)

dann frazier committed 17 years ago

Commit bdefe351 parent a9eb5222 files · +2 −2Browse files

Unified · Split

2 files
  1. scripts/gcc-version.sh +1 −1
  2. scripts/ver_linux +1 −1
scripts/gcc-version.sh+1−1
@@ -18,7 +18,7 @@ compiler="$*" · 17 unmodified lines
18 18
19if [ ${#compiler} -eq 0 ]; then19if [ ${#compiler} -eq 0 ]; then
20 echo "Error: No compiler specified."20 echo "Error: No compiler specified."
21 echo -e "Usage:\n\t$0 <gcc-command>"21 printf "Usage:\n\t$0 <gcc-command>\n"
22 exit 122 exit 1
23fi23fi
24 24
scripts/ver_linux+1−1
@@ -65,7 +65,7 @@ sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps · 64 unmodified lines
65ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \65ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
66'NR==1{print "Dynamic linker (ldd) ", $NF}'66'NR==1{print "Dynamic linker (ldd) ", $NF}'
67 67
68ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \68ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
69 '{print "Linux C++ Library " $4"."$5"."$6}'69 '{print "Linux C++ Library " $4"."$5"."$6}'
70 70
71ps --version 2>&1 | grep version | awk \71ps --version 2>&1 | grep version | awk \