diff --git a/building/linux32/squeak.stack.spur/build/mvm b/building/linux32/squeak.stack.spur/build/mvm index 24a10704bb..5b398c842a 100755 --- a/building/linux32/squeak.stack.spur/build/mvm +++ b/building/linux32/squeak.stack.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspurlinuxht @@ -8,8 +9,8 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a -case $a in +read -r a +case "$a" in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean esac @@ -21,7 +22,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ VM_WORD_SIZE="32" \ VM_CFLAGS="-DNDEBUG -DDEBUGVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.cog.spur/build.assert/mvm b/building/linux32ARMv6/squeak.cog.spur/build.assert/mvm index 8ff86328b8..0c6dbadf5d 100755 --- a/building/linux32ARMv6/squeak.cog.spur/build.assert/mvm +++ b/building/linux32ARMv6/squeak.cog.spur/build.assert/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogspur32linuxhtRPi OPT="-g3 -O1 -DDEBUGVM=0" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.cog.spur/build.debug/mvm b/building/linux32ARMv6/squeak.cog.spur/build.debug/mvm index de69c34d2f..85cdc68502 100755 --- a/building/linux32ARMv6/squeak.cog.spur/build.debug/mvm +++ b/building/linux32ARMv6/squeak.cog.spur/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogspur32linuxhtRPi OPT="-g3 -O0 -DDEBUGVM=1" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.cog.spur/build/mvm b/building/linux32ARMv6/squeak.cog.spur/build/mvm index d52d1a4d27..b2c57f5eae 100755 --- a/building/linux32ARMv6/squeak.cog.spur/build/mvm +++ b/building/linux32ARMv6/squeak.cog.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspur32linuxhtRPi OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.cog.v3/build.assert/mvm b/building/linux32ARMv6/squeak.cog.v3/build.assert/mvm index a502d69306..d9a0cf8575 100755 --- a/building/linux32ARMv6/squeak.cog.v3/build.assert/mvm +++ b/building/linux32ARMv6/squeak.cog.v3/build.assert/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogv3linuxhtRPi OPT="-g3 -O1 -DDEBUGVM=0" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.cog.v3/build.debug/mvm b/building/linux32ARMv6/squeak.cog.v3/build.debug/mvm index 3588316a3c..755b8065c6 100755 --- a/building/linux32ARMv6/squeak.cog.v3/build.debug/mvm +++ b/building/linux32ARMv6/squeak.cog.v3/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug V3 VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogv3linuxhtRPi OPT="-g3 -O0 -DDEBUGVM=1" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.cog.v3/build/mvm b/building/linux32ARMv6/squeak.cog.v3/build/mvm index 525c06d56e..5efc85988d 100755 --- a/building/linux32ARMv6/squeak.cog.v3/build/mvm +++ b/building/linux32ARMv6/squeak.cog.v3/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # V3 VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogv3linuxhtRPi OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.stack.spur/build.assert/mvm b/building/linux32ARMv6/squeak.stack.spur/build.assert/mvm index de7d621c57..83fc244392 100755 --- a/building/linux32ARMv6/squeak.stack.spur/build.assert/mvm +++ b/building/linux32ARMv6/squeak.stack.spur/build.assert/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstkspur32linuxhtRPi OPT="-g3 -O1 -DDEBUGVM=0" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.stack.spur/build.debug/mvm b/building/linux32ARMv6/squeak.stack.spur/build.debug/mvm index f0b77df138..6a53537bfe 100755 --- a/building/linux32ARMv6/squeak.stack.spur/build.debug/mvm +++ b/building/linux32ARMv6/squeak.stack.spur/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspur32linuxhtRPi OPT="-g3 -O0 -DDEBUGVM=1" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.stack.spur/build/mvm b/building/linux32ARMv6/squeak.stack.spur/build/mvm index 639b0440ba..b74864b48c 100755 --- a/building/linux32ARMv6/squeak.stack.spur/build/mvm +++ b/building/linux32ARMv6/squeak.stack.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM and threaded heartbeat INSTALLDIR=sqstkspur32linuxhtRPi OPT="-g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.stack.v3/build.assert/mvm b/building/linux32ARMv6/squeak.stack.v3/build.assert/mvm index 381e05a549..611dbabd69 100755 --- a/building/linux32ARMv6/squeak.stack.v3/build.assert/mvm +++ b/building/linux32ARMv6/squeak.stack.v3/build.assert/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Stack VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstklinuxhtRPi OPT="-g3 -O1 -DDEBUGVM=0" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.stack.v3/build.debug/mvm b/building/linux32ARMv6/squeak.stack.v3/build.debug/mvm index 4553810c1d..38cdd3f6a9 100755 --- a/building/linux32ARMv6/squeak.stack.v3/build.debug/mvm +++ b/building/linux32ARMv6/squeak.stack.v3/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Stack VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstklinuxhtRPi OPT="-g3 -O0 -DDEBUGVM=1" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/squeak.stack.v3/build/mvm b/building/linux32ARMv6/squeak.stack.v3/build/mvm index e1140b67f7..87aee94789 100755 --- a/building/linux32ARMv6/squeak.stack.v3/build/mvm +++ b/building/linux32ARMv6/squeak.stack.v3/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack VM with VM profiler and threaded heartbeat INSTALLDIR=sqstklinuxhtRPi OPT="-g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" @@ -10,7 +11,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CFLAGS="$OPT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag and Raspbian lacks `readlinks` -make -j4 install prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make -j4 install prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32ARMv6/third-party/mvm b/building/linux32ARMv6/third-party/mvm index 7c7c206fb7..846d3d0efa 100755 --- a/building/linux32ARMv6/third-party/mvm +++ b/building/linux32ARMv6/third-party/mvm @@ -3,11 +3,11 @@ set -e # mvm [operation] [path] pushd . -cd `dirname $0` +cd "$(dirname "$0")" case $2 in - install) make -fMakefile.$1 install THIRDPARTYINSTALLDIR=$3 ;; - clean) make -fMakefile.$1 clean ;; - *) make -fMakefile.$1 all ;; + install) make -f"Makefile.$1" install "THIRDPARTYINSTALLDIR=$3" ;; + clean) make -f"Makefile.$1" clean ;; + *) make -f"Makefile.$1" all ;; esac popd diff --git a/building/linux32x86/squeak.cog.spur/build.assert.itimerheartbeat/mvm b/building/linux32x86/squeak.cog.spur/build.assert.itimerheartbeat/mvm index a73f6b8024..c762eb85c6 100755 --- a/building/linux32x86/squeak.cog.spur/build.assert.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.cog.spur/build.assert.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.spur/build.assert/mvm b/building/linux32x86/squeak.cog.spur/build.assert/mvm index 71b2c6ab07..9c3f156949 100755 --- a/building/linux32x86/squeak.cog.spur/build.assert/mvm +++ b/building/linux32x86/squeak.cog.spur/build.assert/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.spur/build.debug.itimerheartbeat/mvm b/building/linux32x86/squeak.cog.spur/build.debug.itimerheartbeat/mvm index a2ca762938..d0d4b6644d 100755 --- a/building/linux32x86/squeak.cog.spur/build.debug.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.cog.spur/build.debug.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.spur/build.debug/mvm b/building/linux32x86/squeak.cog.spur/build.debug/mvm index 70e61a7609..fbc533edc9 100755 --- a/building/linux32x86/squeak.cog.spur/build.debug/mvm +++ b/building/linux32x86/squeak.cog.spur/build.debug/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.spur/build.itimerheartbeat/mvm b/building/linux32x86/squeak.cog.spur/build.itimerheartbeat/mvm index 8f5723761f..fde0326dae 100755 --- a/building/linux32x86/squeak.cog.spur/build.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.cog.spur/build.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.spur/build/mvm b/building/linux32x86/squeak.cog.spur/build/mvm index 7e88742d96..85c60c653d 100755 --- a/building/linux32x86/squeak.cog.spur/build/mvm +++ b/building/linux32x86/squeak.cog.spur/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.v3/build.assert.itimerheartbeat/mvm b/building/linux32x86/squeak.cog.v3/build.assert.itimerheartbeat/mvm index 07704862b3..6da1bf30eb 100755 --- a/building/linux32x86/squeak.cog.v3/build.assert.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.cog.v3/build.assert.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -29,7 +30,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.v3/build.assert/mvm b/building/linux32x86/squeak.cog.v3/build.assert/mvm index 3de63f906b..312fa450a2 100755 --- a/building/linux32x86/squeak.cog.v3/build.assert/mvm +++ b/building/linux32x86/squeak.cog.v3/build.assert/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -29,7 +30,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.v3/build.debug.itimerheartbeat/mvm b/building/linux32x86/squeak.cog.v3/build.debug.itimerheartbeat/mvm index 15322eb561..b69ee3791a 100755 --- a/building/linux32x86/squeak.cog.v3/build.debug.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.cog.v3/build.debug.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -29,7 +30,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.v3/build.debug/mvm b/building/linux32x86/squeak.cog.v3/build.debug/mvm index 6eb5c4e265..08e09df085 100755 --- a/building/linux32x86/squeak.cog.v3/build.debug/mvm +++ b/building/linux32x86/squeak.cog.v3/build.debug/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -29,7 +30,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.v3/build.itimerheartbeat/mvm b/building/linux32x86/squeak.cog.v3/build.itimerheartbeat/mvm index ea4ba4887c..4b1b4fa717 100755 --- a/building/linux32x86/squeak.cog.v3/build.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.cog.v3/build.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.cog.v3/build/mvm b/building/linux32x86/squeak.cog.v3/build/mvm index 1d58d91e0c..76ac13c721 100755 --- a/building/linux32x86/squeak.cog.v3/build/mvm +++ b/building/linux32x86/squeak.cog.v3/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.sista.spur/build.assert.itimerheartbeat/mvm b/building/linux32x86/squeak.sista.spur/build.assert.itimerheartbeat/mvm index 9898bb42d8..bef396dd17 100755 --- a/building/linux32x86/squeak.sista.spur/build.assert.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.sista.spur/build.assert.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.sista.spur/build.assert/mvm b/building/linux32x86/squeak.sista.spur/build.assert/mvm index 81cd10cc95..c1c6dbbfb9 100755 --- a/building/linux32x86/squeak.sista.spur/build.assert/mvm +++ b/building/linux32x86/squeak.sista.spur/build.assert/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.sista.spur/build.debug.itimerheartbeat/mvm b/building/linux32x86/squeak.sista.spur/build.debug.itimerheartbeat/mvm index 3fc9824e53..8d2f54bc06 100755 --- a/building/linux32x86/squeak.sista.spur/build.debug.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.sista.spur/build.debug.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.sista.spur/build.debug/mvm b/building/linux32x86/squeak.sista.spur/build.debug/mvm index a2365ddd69..7dec535037 100755 --- a/building/linux32x86/squeak.sista.spur/build.debug/mvm +++ b/building/linux32x86/squeak.sista.spur/build.debug/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.sista.spur/build.itimerheartbeat/mvm b/building/linux32x86/squeak.sista.spur/build.itimerheartbeat/mvm index a2a2b2ccd0..f73f252df2 100755 --- a/building/linux32x86/squeak.sista.spur/build.itimerheartbeat/mvm +++ b/building/linux32x86/squeak.sista.spur/build.itimerheartbeat/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.sista.spur/build/mvm b/building/linux32x86/squeak.sista.spur/build/mvm index 2e967e59b8..23238157e1 100755 --- a/building/linux32x86/squeak.sista.spur/build/mvm +++ b/building/linux32x86/squeak.sista.spur/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.stack.spur/build.assert/mvm b/building/linux32x86/squeak.stack.spur/build.assert/mvm index 6db8aa38d6..6ddf982a10 100755 --- a/building/linux32x86/squeak.stack.spur/build.assert/mvm +++ b/building/linux32x86/squeak.stack.spur/build.assert/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.stack.spur/build.debug/mvm b/building/linux32x86/squeak.stack.spur/build.debug/mvm index 9e5c39fd4f..bbd2ffbfe7 100755 --- a/building/linux32x86/squeak.stack.spur/build.debug/mvm +++ b/building/linux32x86/squeak.stack.spur/build.debug/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.stack.spur/build/mvm b/building/linux32x86/squeak.stack.spur/build/mvm index 549455ac64..6936ac6356 100755 --- a/building/linux32x86/squeak.stack.spur/build/mvm +++ b/building/linux32x86/squeak.stack.spur/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.stack.v3/build.assert/mvm b/building/linux32x86/squeak.stack.v3/build.assert/mvm index c026916940..334d66e874 100755 --- a/building/linux32x86/squeak.stack.v3/build.assert/mvm +++ b/building/linux32x86/squeak.stack.v3/build.assert/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.stack.v3/build.debug/mvm b/building/linux32x86/squeak.stack.v3/build.debug/mvm index f2b0c34220..649cdb97c1 100755 --- a/building/linux32x86/squeak.stack.v3/build.debug/mvm +++ b/building/linux32x86/squeak.stack.v3/build.debug/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -17,7 +18,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/squeak.stack.v3/build/mvm b/building/linux32x86/squeak.stack.v3/build/mvm index 11735e28f2..862427d34c 100755 --- a/building/linux32x86/squeak.stack.v3/build/mvm +++ b/building/linux32x86/squeak.stack.v3/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i*86) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -18,7 +19,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -31,7 +32,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ TARGET_ARCH="-m32" \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux32x86/third-party/mvm b/building/linux32x86/third-party/mvm index 22da4fbd9d..0eafe76024 100755 --- a/building/linux32x86/third-party/mvm +++ b/building/linux32x86/third-party/mvm @@ -3,11 +3,11 @@ set -e # mvm [operation] [path] pushd . -cd `dirname $0` +cd "$(dirname "$0")" case $2 in - install) make -f Makefile.$1 install THIRDPARTYINSTALLDIR=$3 ;; - clean) make -f Makefile.$1 clean ;; - *) make -f Makefile.$1 all ;; + install) make -f "Makefile.$1" install "THIRDPARTYINSTALLDIR=$3" ;; + clean) make -f "Makefile.$1" clean ;; + *) make -f "Makefile.$1" all ;; esac popd diff --git a/building/linux64/squeak.stack.spur/build/mvm b/building/linux64/squeak.stack.spur/build/mvm index 6568a20f46..1b08a8e7ca 100755 --- a/building/linux64/squeak.stack.spur/build/mvm +++ b/building/linux64/squeak.stack.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64linuxht @@ -8,7 +9,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -23,7 +24,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ VM_WORD_SIZE="64" \ VM_CFLAGS="-DNDEBUG -DDEBUGVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.cog.spur/build.assert/mvm b/building/linux64ARMv8/squeak.cog.spur/build.assert/mvm index 1fe5e22339..de8463f820 100755 --- a/building/linux64ARMv8/squeak.cog.spur/build.assert/mvm +++ b/building/linux64ARMv8/squeak.cog.spur/build.assert/mvm @@ -1,27 +1,28 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Cog Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogspur64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 MACHINE="-march=armv8-a -mtune=cortex-a72" OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" # librt and libpthread functions now supplied by libc. # Many Linux systems supply empty library files but # OpenBSD does not. LIBRT="" # OpenBSD has problems with fast-bitblt under gcc and clang - FASTBITBLT="" + export FASTBITBLT="" # Prefer clang over gcc if available - if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi + if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi else # non-OpenBSD Linux DUALMAP="-DDUAL_MAPPED_CODE_ZONE=1" LIBRT="-lrt" # Linux on ARMv8 properly compiles fast-bitblt under gcc # but compiles-and-segfaults with clang. Use gcc for now. - FASTBITBLT=" --enable-fast-bitblt " + export FASTBITBLT=" --enable-fast-bitblt " CC=gcc fi @@ -30,7 +31,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -45,7 +46,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS=$LIBRT rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm b/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm index 235c119042..0de14cb4ec 100755 --- a/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm +++ b/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm @@ -1,27 +1,28 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Cog Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogspur64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 MACHINE="-march=armv8-a -mtune=cortex-a72" OPT="-g3 -O0 -DDEBUGVM=1 -DAIO_DEBUG=1" -if [ `uname` = "OpenBSD" ]; then - DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" +if [ "$(uname)" = "OpenBSD" ]; then + export DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" # librt and libpthread functions now supplied by libc. # Many Linux systems supply empty library files but # OpenBSD does not. - LIBRT="" + export LIBRT="" # OpenBSD has problems with fast-bitblt under gcc and clang - FASTBITBLT="" + export FASTBITBLT="" # Prefer clang over gcc if available - if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi + if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi else # non-OpenBSD Linux - DUALMAP="-DDUAL_MAPPED_CODE_ZONE=1" - LIBRT="-lrt" + export DUALMAP="-DDUAL_MAPPED_CODE_ZONE=1" + export LIBRT="-lrt" # Linux on ARMv8 properly compiles fast-bitblt under gcc # but compiles-and-segfaults with clang. Use gcc for now. - FASTBITBLT=" --enable-fast-bitblt " + export FASTBITBLT=" --enable-fast-bitblt " CC=gcc fi @@ -30,7 +31,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -45,7 +46,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS=$LIBRT rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.cog.spur/build/mvm b/building/linux64ARMv8/squeak.cog.spur/build/mvm index d299659380..6a6d8e4ba0 100755 --- a/building/linux64ARMv8/squeak.cog.spur/build/mvm +++ b/building/linux64ARMv8/squeak.cog.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Cog Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspur64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 @@ -8,7 +9,7 @@ MACHINE="-march=armv8-a -mtune=cortex-a72" OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -D_GNU_SOURCE -DUSEEVDEV" ##OPT="-g -O3 -DMUSL -DNDEBUG -DDEBUGVM=0" -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" # librt and libpthread functions now supplied by libc. # Many Linux systems supply empty library files but @@ -32,7 +33,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -42,13 +43,13 @@ test -f config.h || ../../../../platforms/unix/config/configure \ --with-vmversion=5.0 --with-src=src/spur64.cog \ --without-npsqueak \ --with-scriptname=spur64 \ - $FASTBITBLT \ + "$FASTBITBLT" \ CC=$CC \ CFLAGS="$MACHINE $OPT -DCOGMTVM=0 $DUALMAP" \ LIBS=$LIBRT ## --without-vm-display-fbdev --without-npsqueak \ rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.cogmt.spur/build.assert/mvm b/building/linux64ARMv8/squeak.cogmt.spur/build.assert/mvm index 888364b321..13a9c85f87 100755 --- a/building/linux64ARMv8/squeak.cogmt.spur/build.assert/mvm +++ b/building/linux64ARMv8/squeak.cogmt.spur/build.assert/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Cog Spur MT VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogspurmt64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 @@ -11,7 +12,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -27,7 +28,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS="-lrt" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.cogmt.spur/build.debug/mvm b/building/linux64ARMv8/squeak.cogmt.spur/build.debug/mvm index 869da456e6..c3e23f30e9 100755 --- a/building/linux64ARMv8/squeak.cogmt.spur/build.debug/mvm +++ b/building/linux64ARMv8/squeak.cogmt.spur/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Cog Spur MT VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogspurmt64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 @@ -11,7 +12,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -27,7 +28,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS="-lrt" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.cogmt.spur/build/mvm b/building/linux64ARMv8/squeak.cogmt.spur/build/mvm index e816f75044..a0cb942ffb 100755 --- a/building/linux64ARMv8/squeak.cogmt.spur/build/mvm +++ b/building/linux64ARMv8/squeak.cogmt.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Cog Spur MT VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspurmt64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 @@ -12,7 +13,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -28,7 +29,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS="-lrt" ## --without-vm-display-fbdev --without-npsqueak \ rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.stack.spur/build.assert/mvm b/building/linux64ARMv8/squeak.stack.spur/build.assert/mvm index 8d0f450a18..74c1b9e67f 100755 --- a/building/linux64ARMv8/squeak.stack.spur/build.assert/mvm +++ b/building/linux64ARMv8/squeak.stack.spur/build.assert/mvm @@ -1,24 +1,25 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstkspur64ARMv8linuxht OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" else DUALMAP="-DDUAL_MAPPED_CODE_ZONE=1" fi # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -33,7 +34,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CC=$CC \ CFLAGS="$OPT -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__ $DUALMAP" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.stack.spur/build.debug/mvm b/building/linux64ARMv8/squeak.stack.spur/build.debug/mvm index 5e1a334e9c..85e23acfb9 100755 --- a/building/linux64ARMv8/squeak.stack.spur/build.debug/mvm +++ b/building/linux64ARMv8/squeak.stack.spur/build.debug/mvm @@ -1,12 +1,13 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspur64ARMv8linuxht OPT="-g3 -O0 -DDEBUG -DDEBUGVM=1 -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DUSEEVDEV -DMUSL" ### OPT="-g3 -O0 -DDEBUGVM=1" -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" else DUALMAP="-DDUAL_MAPPED_CODE_ZONE=1" @@ -20,7 +21,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && (make -n reallyclean;make reallyclean) @@ -36,7 +37,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CFLAGS="$OPT -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__ $DUALMAP" ## --without-vm-display-fbdev --without-npsqueak \ rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/squeak.stack.spur/build/mvm b/building/linux64ARMv8/squeak.stack.spur/build/mvm index 08e022da22..5f318ef7d3 100755 --- a/building/linux64ARMv8/squeak.stack.spur/build/mvm +++ b/building/linux64ARMv8/squeak.stack.spur/build/mvm @@ -1,25 +1,26 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64ARMv8linuxht OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV" ### OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0" else DUALMAP="-DDUAL_MAPPED_CODE_ZONE=1" fi # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -35,7 +36,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CFLAGS="$OPT -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__ $DUALMAP" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64ARMv8/third-party/mvm b/building/linux64ARMv8/third-party/mvm index cfbd0d9346..5c93361519 100755 --- a/building/linux64ARMv8/third-party/mvm +++ b/building/linux64ARMv8/third-party/mvm @@ -3,11 +3,11 @@ set -e # mvm [operation] [path] pushd . -cd `dirname $0` +cd "$(dirname "$0")" case $2 in - install) make -fMakefile.$1 install THIRDPARTYINSTALLDIR=$3 ;; - clean) make -fMakefile.$1 clean ;; - *) make -f Makefile.$1 all ;; + install) make -f "Makefile.$1" install THIRDPARTYINSTALLDIR="$3" ;; + clean) make -f "Makefile.$1" clean ;; + *) make -f "Makefile.$1" all ;; esac popd diff --git a/building/linux64riscv/squeak.stack.spur/build.assert/mvm b/building/linux64riscv/squeak.stack.spur/build.assert/mvm index 3b93b55d95..deb9ea2f10 100755 --- a/building/linux64riscv/squeak.stack.spur/build.assert/mvm +++ b/building/linux64riscv/squeak.stack.spur/build.assert/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstkspur64ARMv8linuxht OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" @@ -9,7 +10,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -22,10 +23,10 @@ test -f config.h || ../../../../platforms/unix/config/configure \ --with-scriptname=spur64 \ CC=gcc \ VM_WORD_SIZE="64" \ - VM_CFLAGS="$OPT" + VM_CFLAGS="$OPT" \ CFLAGS="$OPT" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64riscv/squeak.stack.spur/build.debug/mvm b/building/linux64riscv/squeak.stack.spur/build.debug/mvm index db9ddc39e0..10c666a33f 100755 --- a/building/linux64riscv/squeak.stack.spur/build.debug/mvm +++ b/building/linux64riscv/squeak.stack.spur/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspur64ARMv8linuxht OPT="-g3 -O0 -DDEBUG -DDEBUGVM=1 -D_GNU_SOURCE" @@ -11,7 +12,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -24,11 +25,11 @@ test -f config.h || ../../../../platforms/unix/config/configure \ --with-scriptname=spur64 \ CC=gcc \ VM_WORD_SIZE="64" \ - VM_CFLAGS="$OPT" + VM_CFLAGS="$OPT" \ CFLAGS="$OPT" ## --without-vm-display-fbdev --without-npsqueak \ rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64riscv/squeak.stack.spur/build/mvm b/building/linux64riscv/squeak.stack.spur/build/mvm index 2798375b13..46d88efd5e 100755 --- a/building/linux64riscv/squeak.stack.spur/build/mvm +++ b/building/linux64riscv/squeak.stack.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64linuxht OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -D_GNU_SOURCE" @@ -9,7 +10,7 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -21,11 +22,11 @@ test -f config.h || ../../../../platforms/unix/config/configure \ --without-npsqueak \ CC=gcc \ VM_WORD_SIZE="64" \ - VM_CFLAGS="$OPT" + VM_CFLAGS="$OPT" \ CFLAGS="$OPT" ## --without-vm-display-fbdev rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.cog.spur/build.assert.itimerheartbeat/mvm b/building/linux64x64/squeak.cog.spur/build.assert.itimerheartbeat/mvm index b4029e102e..ff0a254e74 100755 --- a/building/linux64x64/squeak.cog.spur/build.assert.itimerheartbeat/mvm +++ b/building/linux64x64/squeak.cog.spur/build.assert.itimerheartbeat/mvm @@ -1,11 +1,12 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert VM with VM profiler and itimer heartbeat INSTALLDIR=assert/sqcogspur64linux OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift @@ -13,7 +14,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -27,7 +28,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque CC=$CC \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.cog.spur/build.assert/mvm b/building/linux64x64/squeak.cog.spur/build.assert/mvm index f6c8c94075..94a233a5e9 100755 --- a/building/linux64x64/squeak.cog.spur/build.assert/mvm +++ b/building/linux64x64/squeak.cog.spur/build.assert/mvm @@ -1,23 +1,24 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogspur64linuxht OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi # librt and libpthread funs now supplied by libc # Many Linux systems supply empty library files # but OpenBSD does not. -if [ `uname` = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi +if [ "$(uname)" = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi CFLAGS="$OPT -msse2 -DCOGMTVM=0" LIBS=$LIBRT LDFLAGS="" # Special treatment for OpenBSD Linux -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then CFLAGS="$CFLAGS -I/usr/local/include" LIBS="$LIBS -lexecinfo" LDFLAGS="$LDFLAGS -L/usr/local/lib" @@ -29,7 +30,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -46,7 +47,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque LDFLAGS="$LDFLAGS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.cog.spur/build.debug.itimerheartbeat/mvm b/building/linux64x64/squeak.cog.spur/build.debug.itimerheartbeat/mvm index bbb63282c5..28237fa9b0 100755 --- a/building/linux64x64/squeak.cog.spur/build.debug.itimerheartbeat/mvm +++ b/building/linux64x64/squeak.cog.spur/build.debug.itimerheartbeat/mvm @@ -1,11 +1,12 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Spur VM with VM profiler and itimer heartbeat INSTALLDIR=debug/sqcogspur64linux OPT="-g3 -O0 -DDEBUGVM=1" # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift @@ -13,7 +14,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -27,7 +28,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque CC=$CC \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.cog.spur/build.debug/mvm b/building/linux64x64/squeak.cog.spur/build.debug/mvm index 5814694860..4bbb72f5ce 100755 --- a/building/linux64x64/squeak.cog.spur/build.debug/mvm +++ b/building/linux64x64/squeak.cog.spur/build.debug/mvm @@ -1,23 +1,24 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogspur64linuxht OPT="-g3 -O0 -DDEBUGVM=1" # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi # librt and libpthread funs now supplied by libc # Many Linux systems supply empty library files # but OpenBSD does not. -if [ `uname` = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi +if [ "$(uname)" = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi CFLAGS="$OPT -msse2 -DCOGMTVM=0" LIBS=$LIBRT LDFLAGS="" # Special treatment for OpenBSD Linux -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then CFLAGS="$CFLAGS -I/usr/local/include" LIBS="$LIBS -lexecinfo" LDFLAGS="$LDFLAGS -L/usr/local/lib" @@ -29,7 +30,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -46,7 +47,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque LDFLAGS="$LDFLAGS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.cog.spur/build.itimerheartbeat/mvm b/building/linux64x64/squeak.cog.spur/build.itimerheartbeat/mvm index 6586c5301d..b4c401fc67 100755 --- a/building/linux64x64/squeak.cog.spur/build.itimerheartbeat/mvm +++ b/building/linux64x64/squeak.cog.spur/build.itimerheartbeat/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Spur VM with VM profiler and itimer heartbeat INSTALLDIR=sqcogspur64linux # Some gcc versions create a broken VM using -O2 @@ -14,7 +15,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -28,7 +29,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque CC=$CC \ CFLAGS="$OPT -msse2 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.cog.spur/build/mvm b/building/linux64x64/squeak.cog.spur/build/mvm index 5f8639bf78..873b4845bf 100755 --- a/building/linux64x64/squeak.cog.spur/build/mvm +++ b/building/linux64x64/squeak.cog.spur/build/mvm @@ -1,24 +1,25 @@ #!/usr/bin/env bash set -e +set -o pipefail # Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspur64linuxht # Some gcc versions create a broken VM using -O2 OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" # Prefer clang over gcc if available -if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi +if command -v clang > /dev/null; then CC=clang; else CC=gcc; fi # librt and libpthread funs now supplied by libc # Many Linux systems supply empty library files # but OpenBSD does not. -if [ `uname` = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi +if [ "$(uname)" = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi CFLAGS="$OPT -msse2 -DCOGMTVM=0" LIBS=$LIBRT LDFLAGS="" # Special treatment for OpenBSD Linux -if [ `uname` = "OpenBSD" ]; then +if [ "$(uname)" = "OpenBSD" ]; then CFLAGS="$CFLAGS -I/usr/local/include" LIBS="$LIBS -lexecinfo" LDFLAGS="$LDFLAGS -L/usr/local/lib" @@ -30,7 +31,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -46,7 +47,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque LIBS="$LIBS" \ LDFLAGS="$LDFLAGS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.sista.spur/build.assert/mvm b/building/linux64x64/squeak.sista.spur/build.assert/mvm index 96918def63..b60e160723 100755 --- a/building/linux64x64/squeak.sista.spur/build.assert/mvm +++ b/building/linux64x64/squeak.sista.spur/build.assert/mvm @@ -1,19 +1,20 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Sista Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqsisspur64linuxht OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" # Prefer clang over gcc, but use gcc if clang isn't available... CC=gcc -if [ -x /usr/bin/clang ]; then CC=clang; fi +if command -v clang > /dev/null; then CC=clang; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -27,7 +28,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CC=$CC \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.sista.spur/build.debug/mvm b/building/linux64x64/squeak.sista.spur/build.debug/mvm index 054286fa75..0cd9d605d0 100755 --- a/building/linux64x64/squeak.sista.spur/build.debug/mvm +++ b/building/linux64x64/squeak.sista.spur/build.debug/mvm @@ -1,19 +1,20 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Sista Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqsisspur64linuxht OPT="-g3 -O0 -DDEBUGVM=1" # Prefer clang over gcc, but use gcc if clang isn't available... CC=gcc -if [ -x /usr/bin/clang ]; then CC=clang; fi +if command -v clang > /dev/null; then CC=clang; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -27,7 +28,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CC=$CC \ CFLAGS="$OPT -msse2 -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.sista.spur/build/mvm b/building/linux64x64/squeak.sista.spur/build/mvm index 8d5ec2f77c..c2f2802042 100755 --- a/building/linux64x64/squeak.sista.spur/build/mvm +++ b/building/linux64x64/squeak.sista.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Sista Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqsisspur64linuxht OPT="-g -O1 -DNDEBUG -DDEBUGVM=0" @@ -17,14 +18,14 @@ esac # Prefer clang over gcc, but use gcc if clang isn't available... CC=gcc -if [ -x /usr/bin/clang ]; then CC=clang; fi +if command -v clang > /dev/null; then CC=clang; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && make reallyclean @@ -40,7 +41,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS="$LIBS" \ LDFLAGS="$LDFLAGS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.stack.spur/build.assert/mvm b/building/linux64x64/squeak.stack.spur/build.assert/mvm index 420b62f575..2a2dbc5836 100755 --- a/building/linux64x64/squeak.stack.spur/build.assert/mvm +++ b/building/linux64x64/squeak.stack.spur/build.assert/mvm @@ -1,12 +1,13 @@ #!/usr/bin/env bash set -e +set -o pipefail # assert Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstkspur64linuxht OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" # Prefer clang over gcc, but use gcc if clang isn't available... CC=gcc -if [ -x /usr/bin/clang ]; then CC=clang; fi +if command -v gcc >/dev/null; then CC=clang; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift @@ -14,7 +15,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.stack.spur/build.debug/mvm b/building/linux64x64/squeak.stack.spur/build.debug/mvm index 76cb216e04..152ce4edfe 100755 --- a/building/linux64x64/squeak.stack.spur/build.debug/mvm +++ b/building/linux64x64/squeak.stack.spur/build.debug/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspur64linuxht OPT="-g3 -O0 -DDEBUGVM=1" @@ -14,7 +15,7 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -30,7 +31,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/squeak.stack.spur/build/mvm b/building/linux64x64/squeak.stack.spur/build/mvm index 631e8ab732..7bf0b9a0bf 100755 --- a/building/linux64x64/squeak.stack.spur/build/mvm +++ b/building/linux64x64/squeak.stack.spur/build/mvm @@ -1,19 +1,20 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64linuxht OPT="-g -O1 -DNDEBUG -DDEBUGVM=0" # Prefer clang over gcc, but use gcc if clang isn't available... CC=gcc -if [ -x /usr/bin/clang ]; then CC=clang; fi +if command -v clang > /dev/null; then CC=clang; fi if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && make reallyclean @@ -29,7 +30,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ CFLAGS="$OPT -msse2" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer make install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -make install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG ; test ${PIPESTATUS[0]} -eq 0 +make install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/linux64x64/third-party/mvm b/building/linux64x64/third-party/mvm index 259d03d490..3fbdd6bee9 100755 --- a/building/linux64x64/third-party/mvm +++ b/building/linux64x64/third-party/mvm @@ -3,10 +3,10 @@ set -e # mvm [operation] [path] pushd . -cd `dirname $0` +cd "$(dirname "$0")" case $2 in - install) make -f Makefile.$1 install THIRDPARTYINSTALLDIR=$3 ;; - clean) make -f Makefile.$1 clean ;; - *) make -f Makefile.$1 all ;; + install) make -f "Makefile.$1" install THIRDPARTYINSTALLDIR="$3" ;; + clean) make -f "Makefile.$1" clean ;; + *) make -f "Makefile.$1" all ;; esac -popd \ No newline at end of file +popd diff --git a/building/macos32x86/squeak.cog.spur/mvm b/building/macos32x86/squeak.cog.spur/mvm index bd724e6930..2ea7f7eb40 100755 --- a/building/macos32x86/squeak.cog.spur/mvm +++ b/building/macos32x86/squeak.cog.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -12,7 +13,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -20,15 +21,15 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/macos32x86/squeak.cog.v3/mvm b/building/macos32x86/squeak.cog.v3/mvm index bd724e6930..5e5b5be6f7 100755 --- a/building/macos32x86/squeak.cog.v3/mvm +++ b/building/macos32x86/squeak.cog.v3/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -7,12 +8,12 @@ else while getopts 'ASTadf?' opt "$@"; do case $opt in A) A=1;D=1;F=1;; - S) echo -S not yet implemented\; use -A for now 1>&1; exit 1;; - T) echo -T not yet implemented\; use -A for now 1>&1; exit 1;; + S) echo "-S not yet implemented\; use -A for now"; exit 1;; + T) echo "-T not yet implemented\; use -A for now"; exit 1;; a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -20,15 +21,15 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/macos32x86/squeak.sista.spur/mvm b/building/macos32x86/squeak.sista.spur/mvm index bd724e6930..2ea7f7eb40 100755 --- a/building/macos32x86/squeak.sista.spur/mvm +++ b/building/macos32x86/squeak.sista.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -12,7 +13,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -20,15 +21,15 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/macos32x86/squeak.stack.spur/mvm b/building/macos32x86/squeak.stack.spur/mvm index bd724e6930..2ea7f7eb40 100755 --- a/building/macos32x86/squeak.stack.spur/mvm +++ b/building/macos32x86/squeak.stack.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -12,7 +13,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -20,15 +21,15 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/macos32x86/squeak.stack.v3/mvm b/building/macos32x86/squeak.stack.v3/mvm index bd724e6930..e01ef31398 100755 --- a/building/macos32x86/squeak.stack.v3/mvm +++ b/building/macos32x86/squeak.stack.v3/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -7,12 +8,12 @@ else while getopts 'ASTadf?' opt "$@"; do case $opt in A) A=1;D=1;F=1;; - S) echo -S not yet implemented\; use -A for now 1>&1; exit 1;; - T) echo -T not yet implemented\; use -A for now 1>&1; exit 1;; + S) echo "-S not yet implemented; use -A for now"; exit 1;; + T) echo "-T not yet implemented; use -A for now"; exit 1;; a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -20,15 +21,15 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/macos64ARMv8/squeak.cog.spur/mvm b/building/macos64ARMv8/squeak.cog.spur/mvm index a58a6df2b8..3529618bd0 100755 --- a/building/macos64ARMv8/squeak.cog.spur/mvm +++ b/building/macos64ARMv8/squeak.cog.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -8,12 +9,12 @@ else while getopts 'ASTadf?' opt "$@"; do case $opt in A) A=1;D=1;F=1;; - S) echo -S not yet implemented\; use -A for now 1>&1; exit 1;; + S) echo "-S not yet implemented; use -A for now"; exit 1;; T) T=THREADING=multi;; a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,27 +22,27 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi else if [ -n "$D" ]; then - make $@ $T debug 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" debug 2>&1 | tee LOGTD fi if [ -n "$A" ]; then - make $@ $T assert 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" assert 2>&1 | tee LOGTA fi if [ -n "$F" ]; then - make $@ $T 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" 2>&1 | tee LOGTF fi fi diff --git a/building/macos64ARMv8/squeak.sista.spur/mvm b/building/macos64ARMv8/squeak.sista.spur/mvm index a58a6df2b8..20d7ad3849 100755 --- a/building/macos64ARMv8/squeak.sista.spur/mvm +++ b/building/macos64ARMv8/squeak.sista.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -13,7 +14,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,27 +22,27 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi else if [ -n "$D" ]; then - make $@ $T debug 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" debug 2>&1 | tee LOGTD fi if [ -n "$A" ]; then - make $@ $T assert 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" assert 2>&1 | tee LOGTA fi if [ -n "$F" ]; then - make $@ $T 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" 2>&1 | tee LOGTF fi fi diff --git a/building/macos64ARMv8/squeak.stack.spur/mvm b/building/macos64ARMv8/squeak.stack.spur/mvm index a58a6df2b8..3529618bd0 100755 --- a/building/macos64ARMv8/squeak.stack.spur/mvm +++ b/building/macos64ARMv8/squeak.stack.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -8,12 +9,12 @@ else while getopts 'ASTadf?' opt "$@"; do case $opt in A) A=1;D=1;F=1;; - S) echo -S not yet implemented\; use -A for now 1>&1; exit 1;; + S) echo "-S not yet implemented; use -A for now"; exit 1;; T) T=THREADING=multi;; a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,27 +22,27 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi else if [ -n "$D" ]; then - make $@ $T debug 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" debug 2>&1 | tee LOGTD fi if [ -n "$A" ]; then - make $@ $T assert 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" assert 2>&1 | tee LOGTA fi if [ -n "$F" ]; then - make $@ $T 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" 2>&1 | tee LOGTF fi fi diff --git a/building/macos64x64/squeak.cog.spur/mvm b/building/macos64x64/squeak.cog.spur/mvm index a58a6df2b8..4861713715 100755 --- a/building/macos64x64/squeak.cog.spur/mvm +++ b/building/macos64x64/squeak.cog.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -13,7 +14,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,27 +22,27 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1)) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi else if [ -n "$D" ]; then - make $@ $T debug 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" debug 2>&1 | tee LOGTD fi if [ -n "$A" ]; then - make $@ $T assert 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" assert 2>&1 | tee LOGTA fi if [ -n "$F" ]; then - make $@ $T 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" 2>&1 | tee LOGTF fi fi diff --git a/building/macos64x64/squeak.sista.spur/mvm b/building/macos64x64/squeak.sista.spur/mvm index a58a6df2b8..2636d38b30 100755 --- a/building/macos64x64/squeak.sista.spur/mvm +++ b/building/macos64x64/squeak.sista.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -13,7 +14,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,27 +22,27 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi else if [ -n "$D" ]; then - make $@ $T debug 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" debug 2>&1 | tee LOGTD fi if [ -n "$A" ]; then - make $@ $T assert 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" assert 2>&1 | tee LOGTA fi if [ -n "$F" ]; then - make $@ $T 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" 2>&1 | tee LOGTF fi fi diff --git a/building/macos64x64/squeak.stack.spur/mvm b/building/macos64x64/squeak.stack.spur/mvm index a58a6df2b8..614beb310c 100755 --- a/building/macos64x64/squeak.stack.spur/mvm +++ b/building/macos64x64/squeak.stack.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -13,7 +14,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,27 +22,27 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift "$(( OPTIND - 1 ))" fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then if [ -n "$D" ]; then - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi else if [ -n "$D" ]; then - make $@ $T debug 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" debug 2>&1 | tee LOGTD fi if [ -n "$A" ]; then - make $@ $T assert 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" assert 2>&1 | tee LOGTA fi if [ -n "$F" ]; then - make $@ $T 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" "$T" 2>&1 | tee LOGTF fi fi diff --git a/building/minheadless.cmake/x64/squeak.cog.spur+sdl2/mvm b/building/minheadless.cmake/x64/squeak.cog.spur+sdl2/mvm index 27576766ab..b3bb84cccd 100755 --- a/building/minheadless.cmake/x64/squeak.cog.spur+sdl2/mvm +++ b/building/minheadless.cmake/x64/squeak.cog.spur+sdl2/mvm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash if [ "$1" = "-f" ]; then ./mvm_configure_variant release Release make -C release all install diff --git a/building/minheadless.cmake/x64/squeak.cog.spur/mvm b/building/minheadless.cmake/x64/squeak.cog.spur/mvm index 27576766ab..b3bb84cccd 100755 --- a/building/minheadless.cmake/x64/squeak.cog.spur/mvm +++ b/building/minheadless.cmake/x64/squeak.cog.spur/mvm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash if [ "$1" = "-f" ]; then ./mvm_configure_variant release Release make -C release all install diff --git a/building/minheadless.cmake/x86/squeak.cog.spur+sdl2/mvm b/building/minheadless.cmake/x86/squeak.cog.spur+sdl2/mvm index 27576766ab..b3bb84cccd 100755 --- a/building/minheadless.cmake/x86/squeak.cog.spur+sdl2/mvm +++ b/building/minheadless.cmake/x86/squeak.cog.spur+sdl2/mvm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash if [ "$1" = "-f" ]; then ./mvm_configure_variant release Release make -C release all install diff --git a/building/minheadless.cmake/x86/squeak.cog.spur/mvm b/building/minheadless.cmake/x86/squeak.cog.spur/mvm index 27576766ab..b3bb84cccd 100755 --- a/building/minheadless.cmake/x86/squeak.cog.spur/mvm +++ b/building/minheadless.cmake/x86/squeak.cog.spur/mvm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash if [ "$1" = "-f" ]; then ./mvm_configure_variant release Release make -C release all install diff --git a/building/minheadless.cmake/x86/squeak.stack.spur/mvm b/building/minheadless.cmake/x86/squeak.stack.spur/mvm index a98e695133..b3bb84cccd 100755 --- a/building/minheadless.cmake/x86/squeak.stack.spur/mvm +++ b/building/minheadless.cmake/x86/squeak.stack.spur/mvm @@ -1,4 +1,4 @@ -#!/bin/env bash +#!/usr/bin/env bash if [ "$1" = "-f" ]; then ./mvm_configure_variant release Release make -C release all install diff --git a/building/sunos32x86/squeak.cog.spur/build/mvm b/building/sunos32x86/squeak.cog.spur/build/mvm index 2699644ee6..908bfe31ec 100755 --- a/building/sunos32x86/squeak.cog.spur/build/mvm +++ b/building/sunos32x86/squeak.cog.spur/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i86pc) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -22,11 +23,12 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && $MAKE reallyclean esac +# this logic is broken || and && are not ternary operators test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) test -f config.h || ../../../../platforms/unix/config/configure --without-npsqueak \ @@ -41,7 +43,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque LIBS="$LIBS" \ CFLAGS="$OPT -DCOGMTVM=0" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -$MAKE install-squeak install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG +$MAKE install-squeak install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/sunos32x86/squeak.stack.spur/build/mvm b/building/sunos32x86/squeak.stack.spur/build/mvm index 3bb9b469b5..a9606ddeef 100755 --- a/building/sunos32x86/squeak.stack.spur/build/mvm +++ b/building/sunos32x86/squeak.stack.spur/build/mvm @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -e -case "`uname -m`" in # ensure we see x86 as machine type +set -o pipefail +case "$(uname -m)" in # ensure we see x86 as machine type i86pc) ;; # we're good -*) if type i386 2>&1 >/dev/null; then +*) if type i386 >/dev/null 2>&1; then echo "Re-exec as x86" exec i386 "$0" "$@" fi ;; @@ -21,11 +22,12 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && $MAKE reallyclean esac +# this logic is broken || and && are not ternary operators test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) test -f config.h || ../../../../platforms/unix/config/configure \ @@ -41,7 +43,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS="$LIBS" \ CFLAGS="$OPT" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -$MAKE install-squeak install-doc install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG +$MAKE install-squeak install-doc install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/sunos64x64/squeak.cog.spur/build/mvm b/building/sunos64x64/squeak.cog.spur/build/mvm index aafb408c55..099af6fd2e 100755 --- a/building/sunos64x64/squeak.cog.spur/build/mvm +++ b/building/sunos64x64/squeak.cog.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspur64sunosht/usr # Some gcc versions create a broken VM using -O2 @@ -16,11 +17,12 @@ fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) test -f Makefile && $MAKE reallyclean esac +# this logic is broken || and && are not ternary operators test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) test -f config.h || ../../../../platforms/unix/config/configure --without-npsqueak \ @@ -36,7 +38,7 @@ test -f config.h || ../../../../platforms/unix/config/configure --without-npsque LIBS="$LIBS" \ LDFLAGS="$LDFLAGS" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -$MAKE install-squeak install-doc install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG +$MAKE install-squeak install-doc install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/sunos64x64/squeak.stack.spur/build/mvm b/building/sunos64x64/squeak.stack.spur/build/mvm index 50a42a5070..e34a0f9de0 100755 --- a/building/sunos64x64/squeak.stack.spur/build/mvm +++ b/building/sunos64x64/squeak.stack.spur/build/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64sunosht/usr # Some gcc versions create a broken VM using -O2 @@ -12,11 +13,12 @@ if [ $# -ge 1 ]; then fi if ../../../../scripts/checkSCCSversion ; then exit 1; fi echo -n "clean? " -read a +read -r a case $a in n|no|N|NO) echo "ok but this isn't safe!!";; *) rm -f config.h; test -f Makefile && $MAKE reallyclean esac +# this logic is broken || and && are not ternary operators test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) test -f config.h || ../../../../platforms/unix/config/configure \ @@ -32,7 +34,7 @@ test -f config.h || ../../../../platforms/unix/config/configure \ LIBS="$LIBS" \ CFLAGS="$OPT" rm -f vm/sqUnixMain.o # nuke version info -rm -rf ../../../../products/$INSTALLDIR +rm -rf "../../../../products/$INSTALLDIR" # prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag -$MAKE install-squeak install-doc install-plugins prefix=`(cd ../../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG +$MAKE install-squeak install-doc install-plugins prefix="$(cd ../../../../;pwd)/products/$INSTALLDIR" 2>&1 | tee LOG diff --git a/building/win32x86/squeak.cog.spur.lowcode/mvm b/building/win32x86/squeak.cog.spur.lowcode/mvm index 55d88db096..8dfac4ff92 100755 --- a/building/win32x86/squeak.cog.spur.lowcode/mvm +++ b/building/win32x86/squeak.cog.spur.lowcode/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -10,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win32x86/squeak.cog.spur/mvm b/building/win32x86/squeak.cog.spur/mvm index 0800b5acbc..a5695f4a29 100755 --- a/building/win32x86/squeak.cog.spur/mvm +++ b/building/win32x86/squeak.cog.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -8,12 +9,12 @@ else while getopts 'ASTadf?' opt "$@"; do case $opt in A) A=1;D=1;F=1;; - S) echo -S not yet implemented\; use -A for now 1>&1; exit 1;; + S) echo "-S not yet implemented; use -A for now"; exit 1;; T) T=1;; a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,33 +22,33 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` # drop options, pass other args to make + shift $(( OPTIND - 1 )) # drop options, pass other args to make fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then # single-threaded VM if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ product 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" product 2>&1 | tee LOGF fi else # multi-threaded VM if [ -n "$D" ]; then rm -rf buildmtdbg/vm/*.exe - make $@ debugmt 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debugmt 2>&1 | tee LOGTD fi if [ -n "$A" ]; then rm -rf buildmtast/vm/*.exe - make $@ assertmt 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assertmt 2>&1 | tee LOGTA fi if [ -n "$F" ]; then rm -rf buildmt/vm/*.exe - make $@ productmt 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" productmt 2>&1 | tee LOGTF fi fi diff --git a/building/win32x86/squeak.cog.v3/mvm b/building/win32x86/squeak.cog.v3/mvm index 55d88db096..a61acd0962 100755 --- a/building/win32x86/squeak.cog.v3/mvm +++ b/building/win32x86/squeak.cog.v3/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -10,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win32x86/squeak.sista.spur/mvm b/building/win32x86/squeak.sista.spur/mvm index 55d88db096..a61acd0962 100755 --- a/building/win32x86/squeak.sista.spur/mvm +++ b/building/win32x86/squeak.sista.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -10,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win32x86/squeak.stack.spur/mvm b/building/win32x86/squeak.stack.spur/mvm index 55d88db096..a61acd0962 100755 --- a/building/win32x86/squeak.stack.spur/mvm +++ b/building/win32x86/squeak.stack.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -10,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win32x86/squeak.stack.v3/mvm b/building/win32x86/squeak.stack.v3/mvm index 55d88db096..a61acd0962 100755 --- a/building/win32x86/squeak.stack.v3/mvm +++ b/building/win32x86/squeak.stack.v3/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -10,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win64ARMv8/squeak.cog.spur/mvm b/building/win64ARMv8/squeak.cog.spur/mvm index 0800b5acbc..5ec7b260f5 100755 --- a/building/win64ARMv8/squeak.cog.spur/mvm +++ b/building/win64ARMv8/squeak.cog.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -13,7 +14,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,33 +22,33 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` # drop options, pass other args to make + shift $(( OPTIND - 1 )) # drop options, pass other args to make fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then # single-threaded VM if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ product 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" product 2>&1 | tee LOGF fi else # multi-threaded VM if [ -n "$D" ]; then rm -rf buildmtdbg/vm/*.exe - make $@ debugmt 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debugmt 2>&1 | tee LOGTD fi if [ -n "$A" ]; then rm -rf buildmtast/vm/*.exe - make $@ assertmt 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assertmt 2>&1 | tee LOGTA fi if [ -n "$F" ]; then rm -rf buildmt/vm/*.exe - make $@ productmt 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" productmt 2>&1 | tee LOGTF fi fi diff --git a/building/win64ARMv8/squeak.sista.spur/mvm b/building/win64ARMv8/squeak.sista.spur/mvm index 55d88db096..8dfac4ff92 100644 --- a/building/win64ARMv8/squeak.sista.spur/mvm +++ b/building/win64ARMv8/squeak.sista.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -10,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win64ARMv8/squeak.stack.spur/mvm b/building/win64ARMv8/squeak.stack.spur/mvm index 104047e08f..58fc42ab3b 100755 --- a/building/win64ARMv8/squeak.stack.spur/mvm +++ b/building/win64ARMv8/squeak.stack.spur/mvm @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -9,7 +9,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -17,18 +17,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win64x64/squeak.cog.spur/mvm b/building/win64x64/squeak.cog.spur/mvm index 0800b5acbc..d169857f86 100755 --- a/building/win64x64/squeak.cog.spur/mvm +++ b/building/win64x64/squeak.cog.spur/mvm @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -o pipefail # A=all(a,d,f) T=Threaded a=assert d=debug f=fast A=;D=;F=;T= if [ $# = 0 ]; then @@ -13,7 +14,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -21,33 +22,33 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` # drop options, pass other args to make + shift $(( OPTIND - 1 )) # drop options, pass other args to make fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -z "$T" ]; then # single-threaded VM if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ product 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" product 2>&1 | tee LOGF fi else # multi-threaded VM if [ -n "$D" ]; then rm -rf buildmtdbg/vm/*.exe - make $@ debugmt 2>&1 | tee LOGTD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debugmt 2>&1 | tee LOGTD fi if [ -n "$A" ]; then rm -rf buildmtast/vm/*.exe - make $@ assertmt 2>&1 | tee LOGTA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assertmt 2>&1 | tee LOGTA fi if [ -n "$F" ]; then rm -rf buildmt/vm/*.exe - make $@ productmt 2>&1 | tee LOGTF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" productmt 2>&1 | tee LOGTF fi fi diff --git a/building/win64x64/squeak.sista.spur/mvm b/building/win64x64/squeak.sista.spur/mvm index 55d88db096..4bf4a66c30 100644 --- a/building/win64x64/squeak.sista.spur/mvm +++ b/building/win64x64/squeak.sista.spur/mvm @@ -10,7 +10,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -18,18 +18,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/building/win64x64/squeak.stack.spur/mvm b/building/win64x64/squeak.stack.spur/mvm index 104047e08f..a61acd0962 100755 --- a/building/win64x64/squeak.stack.spur/mvm +++ b/building/win64x64/squeak.stack.spur/mvm @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash +set -e +set -o pipefail A=;D=;F= if [ $# = 0 ]; then A=1;D=1;F=1 @@ -9,7 +11,7 @@ else a) A=1;; d) D=1;; f) F=1;; - *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + *) echo "usage $0 [-A] [-a] [-d] [-f]"; exit 0;; esac done if [ "$1" = -- ]; then @@ -17,18 +19,18 @@ else A=1;D=1;F=1 fi fi - shift `expr $OPTIND - 1` + shift $(( OPTIND - 1 )) fi if ../../../scripts/checkSCCSversion ; then exit 1; fi if [ -n "$D" ]; then rm -rf builddbg/vm/*.exe - make $@ debug 2>&1 | tee LOGD ; test ${PIPESTATUS[0]} -eq 0 + make "$@" debug 2>&1 | tee LOGD fi if [ -n "$A" ]; then rm -rf buildast/vm/*.exe - make $@ assert 2>&1 | tee LOGA ; test ${PIPESTATUS[0]} -eq 0 + make "$@" assert 2>&1 | tee LOGA fi if [ -n "$F" ]; then rm -rf build/vm/*.exe - make $@ 2>&1 | tee LOGF ; test ${PIPESTATUS[0]} -eq 0 + make "$@" 2>&1 | tee LOGF fi diff --git a/image/envvars.sh b/image/envvars.sh old mode 100755 new mode 100644 index 60f854c5c9..33eefa4d0f --- a/image/envvars.sh +++ b/image/envvars.sh @@ -7,34 +7,47 @@ BASESISTA64=trunk6-sista-64 # N.B. uname -r (OSREL) is not to be trusted on Mac OS X; -if test -x /usr/bin/uname; then - OS=`/usr/bin/uname -s` - CPU=`/usr/bin/uname -m` - OSREL=`/usr/bin/uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'` -elif test -x /bin/uname; then - OS=`/bin/uname -s` - CPU=`/bin/uname -m` - OSREL=`/bin/uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'` +if test -x uname; then + OS=$(uname -s) + CPU=$(uname -m) + OSREL=$(uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/') +elif test -x uname; then + OS=$(uname -s) + CPU=$(uname -m) + OSREL=$(uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/') else - OS=`uname -s` - CPU=`uname -m` - OSREL=`uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'` + OS=$(uname -s) + CPU=$(uname -m) + OSREL=$(uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/') fi -test "$OS" = Darwin && function quietmd5 { /sbin/md5 -q "$1" 2>/dev/null; } -test "$OS" = Darwin || function quietmd5 { /usr/bin/md5sum "$1" | sed 's/ .*$//' 2>/dev/null; } +function quietmd5() { + if command -v md5 >/dev/null 2>&1; then + # macOS / BSD + md5 -q "$1" 2>/dev/null + elif command -v md5sum >/dev/null 2>&1; then + # Linux / BusyBox + md5sum "$1" 2>/dev/null | cut -d ' ' -f 1 + else + echo "quietmd5: neither md5 nor md5sum found in PATH" >&2 + return 1 + fi +} -test "$OS" = Darwin && function geturl { FILE=`basename "$1"`; curl -C - "`echo $1 | sed 's/ /%20/g'`" -o "$FILE"; } -test "$OS" = Darwin || function geturl { wget -c "$1"; } +function geturl() { + local url="$1" -if [ "$OS" != Darwin -a ! -x "`which wget`" ]; then - echo "cannot find wget. wget for Windows is available from http://gnuwin32.sourceforge.net/packages/wget.htm, probably as http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe" 1>&2 - exit -fi + if command -v curl >/dev/null 2>&1; then + curl -C - -O "$url" + elif command -v wget >/dev/null 2>&1; then + wget -c "$url" + else + echo "geturl: neither curl nor wget found in PATH" >&2 + return 1 + fi +} -if unzip --help >/dev/null; then - true -else +if ! command -v unzip >/dev/null 2>&1; then echo 'could not find unzip. you can find instructions on how to install it on google.' 1>&2; exit 1 fi diff --git a/image/getGoodSpur64VM.sh b/image/getGoodSpur64VM.sh index a7fcc32874..7b96ff3799 100755 --- a/image/getGoodSpur64VM.sh +++ b/image/getGoodSpur64VM.sh @@ -11,7 +11,7 @@ LATEST_RELEASE_URL="$RELEASES_URL/latest" for foo in once; do # allow break to jump to end of script -if [ "$1" = -vm -a -n "$2" -a -x "`which "$2"`" ]; then +if [ "$1" = -vm -a -n "$2" -a -x "$(which "$2")" ]; then VM="$2" shift;shift else @@ -74,7 +74,7 @@ else Darwin) if open $LATESTVM; then while [ ! -d "/Volumes/$VOLUME/$VMDIR" ]; do sleep 1; done - rm -rf $VMDIR + rm -rf "$VMDIR" cp -Rp "/Volumes/$VOLUME/$VMDIR" $VMDIR diskutil eject "/Volumes/$VOLUME" fi;; diff --git a/image/getGoodSpurVM.sh b/image/getGoodSpurVM.sh index dcc4597622..499d37b845 100755 --- a/image/getGoodSpurVM.sh +++ b/image/getGoodSpurVM.sh @@ -35,7 +35,7 @@ else curl -L "$URL" -o "$LATESTVM" open $LATESTVM while [ ! -d "/Volumes/$VOLUME/Squeak.app" ]; do sleep 1; done - rm -rf $VM + rm -rf "$VM" cp -Rp "/Volumes/$VOLUME/Squeak.app" $VM diskutil eject "/Volumes/$VOLUME" fi @@ -83,7 +83,7 @@ else echo curl -L "$URL" -o "$LATESTVM" curl -L "$URL" -o "$LATESTVM" unzip $LATESTVM -d sqwin.$LATESTRELEASE - rm -f $LATESTVM + rm -f "$LATESTVM" fi VM=sqwin.$LATESTRELEASE/SqueakConsole.exe;; *) echo "do not know how to download a VM for your system" 1>&2 diff --git a/image/getsqueak50.sh b/image/getsqueak50.sh index d63064aad1..53309bbd46 100755 --- a/image/getsqueak50.sh +++ b/image/getsqueak50.sh @@ -5,9 +5,9 @@ set -e IMAGEHASH=e6be0ea204a8409dc0976a792502ab65 ZIPHASH=2f17e1d8eb9bec2b7554d3405652b122 -if [ "`quietmd5 \"$SQUEAK50\".image`" != $IMAGEHASH ]; then +if [ "$(quietmd5 "$SQUEAK50".image)" != $IMAGEHASH ]; then ZIP=Squeak-5.0-All-in-One.zip - if [ "`quietmd5 $ZIP`" != $ZIPHASH ] + if [ "$(quietmd5 $ZIP)" != $ZIPHASH ] then geturl http://files.squeak.org/5.0/$ZIP fi @@ -21,4 +21,4 @@ if [ "`quietmd5 \"$SQUEAK50\".image`" != $IMAGEHASH ]; then unzip $ZIP rm -rf __MACOSX fi -test -f SqueakV50.sources || ln $SQUEAK50RESOURCES/SqueakV50.sources . +test -f SqueakV50.sources || ln "$SQUEAK50RESOURCES/SqueakV50.sources" . diff --git a/platforms/unix/config/mkmf b/platforms/unix/config/mkmf index 3490f02d7c..d2c169cf70 100755 --- a/platforms/unix/config/mkmf +++ b/platforms/unix/config/mkmf @@ -1,23 +1,23 @@ #!/bin/sh # mkmf -- configure subdirectory Makefiles -*- sh -*- -# +# # Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors # listed elsewhere in this file. # All rights reserved. -# +# # This file is part of Unix Squeak. -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -25,9 +25,9 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# +# # Author: ian.piumarta@inria.fr -# +# # Last edited: Thu Jan 21 14:10:49 PST 2010 by eliot (add support for .cpp) . ./config.sh @@ -46,7 +46,7 @@ findDirs() { shift dirs="" while test $# -gt 0; do - dirs="${dirs} ${prefix}`dirname $1`" + dirs="${dirs} ${prefix}$(dirname "$1")" shift done echo ${dirs} | tr ' ' '\012' | sort | uniq | tr '\012' ' ' @@ -82,16 +82,16 @@ mkmf() { if test -d ${d}; then dd=${d} if test -f ${d}/mkmf.subdirs; then - subdirs="`cat ${d}/mkmf.subdirs | tr '\012' ' '`" + subdirs="$(cat ${d}/mkmf.subdirs | tr '\012' ' ')" for sd in ${subdirs}; do dd="${dd} ${topdir}/${sd}"; done fi - srcs="${srcs} `findFiles .c ${dd}`" - srcs="${srcs} `findFiles .cc ${dd}`" - srcs="${srcs} `findFiles .cpp ${dd}`" - srcs="${srcs} `findFiles .S ${dd}`" - srcs="${srcs} `findFiles .s ${dd}`" - srcs="${srcs} `findFiles .m ${dd}`" - hdrs="${hdrs} `findFiles .h ${dd}`" + srcs="${srcs} $(findFiles .c ${dd})" + srcs="${srcs} $(findFiles .cc ${dd})" + srcs="${srcs} $(findFiles .cpp ${dd})" + srcs="${srcs} $(findFiles .S ${dd})" + srcs="${srcs} $(findFiles .s ${dd})" + srcs="${srcs} $(findFiles .m ${dd})" + hdrs="${hdrs} $(findFiles .h ${dd})" # override Makefile.in if test -f "${d}/Makefile.in"; then makefile_in="${d}/Makefile.in" @@ -103,8 +103,8 @@ mkmf() { test -f "${d}/Targets.exclude" && cat "${d}/Targets.exclude" >>${excluded} fi done - srcs="`echo ${srcs} | tr ' ' '\012' | fgrep -v '*'`" - hdrs="`echo ${hdrs} | tr ' ' '\012' | fgrep -v '*'`" + srcs="$(echo ${srcs} | tr ' ' '\012' | fgrep -v '*')" + hdrs="$(echo ${hdrs} | tr ' ' '\012' | fgrep -v '*')" # create targets and rules if test "${srcs}" != ""; then # objs is used to make the list of targets unique so that a platform can @@ -114,7 +114,7 @@ mkmf() { # in the platform plugin dir) echo "" > ${objs} for c in ${srcs}; do - o=`basename ${c} | sed 's,\.cp*,$o,;s,\.[msS],$o,'` + o=$(basename ${c} | sed 's,\.cp*,$o,;s,\.[msS],$o,') grep -qs "^$o$" ${excluded} || grep -qs "^$o$" ${objs} || targets="${targets} ${o}" echo "$o" >>${objs} echo >> ${make_targets} @@ -130,7 +130,7 @@ mkmf() { fi # create includes if test "${hdrs}" != ""; then - includes="${includes} `findDirs -I ${hdrs}`" + includes="${includes} $(findDirs -I ${hdrs})" fi # default Makefile.in if no override if test ! -f "${makefile_in}"; then @@ -167,7 +167,7 @@ s%\[make_plg\]%%g s%\[plibs\]%${plibs}%g /\[make_targets\]/r ${make_targets} s%\[make_targets\]%%g" > ${name}/Makefile - /bin/rm -f ${make_targets} makefile.in makefile.sub + rm -f ${make_targets} makefile.in makefile.sub } plibs="" @@ -181,7 +181,7 @@ plibs="" if test "${ext_modules}" != ""; then for p in ${ext_modules}; do if test -f ${p}.lib; then - plibs="`cat ${p}.lib`" + plibs="$(cat ${p}.lib)" else plibs="" fi @@ -200,7 +200,7 @@ plibs="" if test "${ext_plugins}" != ""; then for p in ${ext_plugins}; do if test -f ${p}.lib; then - plibs="`cat ${p}.lib`" + plibs="$(cat ${p}.lib)" else plibs="" fi diff --git a/platforms/unix/config/squeak.sh.in b/platforms/unix/config/squeak.sh.in index 9865e2d0ef..9eb1e06d6e 100644 --- a/platforms/unix/config/squeak.sh.in +++ b/platforms/unix/config/squeak.sh.in @@ -1,7 +1,7 @@ -#!/bin/sh +#!/usr/bin/env bash # Run the VM, setting SQUEAK_PLUGINS if unset to the VM's containing directory # if unset, and ensuring LD_LIBRARY_PATH includes the VM's containing directory. -BIN=`/usr/bin/dirname "$0"`/@expanded_relative_imgdir@ +BIN=$(dirname "$0")/@expanded_relative_imgdir@ GDB= if [ "${SQUEAK_PLUGINS-unset}" = unset ]; then export SQUEAK_PLUGINS="$BIN" @@ -15,7 +15,7 @@ fi # At least on linux LD_LIBRARY_PATH's components must be absolute path names case "$BIN" in /*) PLUGINS="$BIN";; -*) PLUGINS="`pwd`/$BIN" +*) PLUGINS="$(pwd)/$BIN" esac if [ $(uname -s) = "OpenBSD" ]; then @@ -26,8 +26,8 @@ fi # libc (e.g. through the FFI) then it must use the same version that the VM uses # and so it should take precedence over /lib libc. This is done by setting # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM. -LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`" -PLATFORMLIBDIR=`expr "$LIBC_SO" : '\(.*\)/libc.*'` +LIBC_SO="$(ldd "$BIN/squeak" | fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/')" +PLATFORMLIBDIR=$(expr "$LIBC_SO" : '\(.*\)/libc.*') if [ "$PLATFORMLIBDIR" = "" ]; then { @@ -37,7 +37,7 @@ if [ "$PLATFORMLIBDIR" = "" ]; then echo " LIBC_SO="$LIBC_SO cat /etc/*-release* | grep -v // | sed 's/^/ /' echo -n " UNAME=" ; uname -a - MACHINE=`uname -m` + MACHINE=$(uname -m) case "$MACHINE" in *64*) echo " System seems to be 64 bit. You may need to (re)install the 32-bit libraries."