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
1818
1919 if [ ${#compiler} -eq 0 ]; then
2020 echo "Error: No compiler specified."
21− echo -e "Usage:\n\t$0 <gcc-command>"
21+ printf "Usage:\n\t$0 <gcc-command>\n"
2222 exit 1
2323 fi
2424
scripts/ver_linux+1−1
@@ -65,7 +65,7 @@ sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps · 64 unmodified lines
6565 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
6666 'NR==1{print "Dynamic linker (ldd) ", $NF}'
6767
68−ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \
68+ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
6969 '{print "Linux C++ Library " $4"."$5"."$6}'
7070
7171 ps --version 2>&1 | grep version | awk \