diff --git a/.gitignore b/.gitignore
index 75e23c8..9261d25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*.o
*.obj
+*~
.dub
.directory
@@ -26,6 +27,10 @@
/test/expected-issue616-output
/test/describe-project/dummy.dat
/test/describe-project/dummy-dep1.dat
+/test/*/main/main
+/test/*/*test-library
+/test/*/*test-application
+/test/*/exec-simple
# Ignore coverage files
cov/
diff --git a/build-gdc.sh b/build-gdc.sh
index 1924b08..203f8c9 100755
--- a/build-gdc.sh
+++ b/build-gdc.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
set -e
if [ "$GDC" = "" ]; then
diff --git a/scripts/rpm-package/make_installer.sh b/scripts/rpm-package/make_installer.sh
index eb2ab86..097e9c4 100755
--- a/scripts/rpm-package/make_installer.sh
+++ b/scripts/rpm-package/make_installer.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
set -e
cd ../../
DUB_PATH=`pwd`
diff --git a/source/dub/generators/visuald.d b/source/dub/generators/visuald.d
index bd1fd95..87c8e51 100644
--- a/source/dub/generators/visuald.d
+++ b/source/dub/generators/visuald.d
@@ -349,6 +349,7 @@
ret.put(" 0\n");
ret.put(" 0\n");
ret.put(" 0\n");
+ ret.put(" 0\n");
ret.put(" 0\n");
ret.put(" 0\n");
ret.put(" 0\n");
diff --git a/test/describe-dependency-1/dependency-postGenerateCommands.sh b/test/describe-dependency-1/dependency-postGenerateCommands.sh
index 1a24852..f1f641a 100755
--- a/test/describe-dependency-1/dependency-postGenerateCommands.sh
+++ b/test/describe-dependency-1/dependency-postGenerateCommands.sh
@@ -1 +1 @@
-#!/bin/sh
+#!/usr/bin/env bash
diff --git a/test/describe-dependency-1/dependency-preGenerateCommands.sh b/test/describe-dependency-1/dependency-preGenerateCommands.sh
index 1a24852..f1f641a 100755
--- a/test/describe-dependency-1/dependency-preGenerateCommands.sh
+++ b/test/describe-dependency-1/dependency-preGenerateCommands.sh
@@ -1 +1 @@
-#!/bin/sh
+#!/usr/bin/env bash
diff --git a/test/describe-project/do-postGenerateCommands.sh b/test/describe-project/do-postGenerateCommands.sh
index 1a24852..f1f641a 100755
--- a/test/describe-project/do-postGenerateCommands.sh
+++ b/test/describe-project/do-postGenerateCommands.sh
@@ -1 +1 @@
-#!/bin/sh
+#!/usr/bin/env bash
diff --git a/test/describe-project/do-preGenerateCommands.sh b/test/describe-project/do-preGenerateCommands.sh
index 1a24852..f1f641a 100755
--- a/test/describe-project/do-preGenerateCommands.sh
+++ b/test/describe-project/do-preGenerateCommands.sh
@@ -1 +1 @@
-#!/bin/sh
+#!/usr/bin/env bash
diff --git a/test/interactive-remove.sh b/test/interactive-remove.sh
index f689fdd..3608a2b 100755
--- a/test/interactive-remove.sh
+++ b/test/interactive-remove.sh
@@ -7,7 +7,7 @@
if $DUB remove dub --non-interactive 2>/dev/null; then
die $LINENO 'Non-interactive remove should fail'
fi
-echo 1 | $DUB remove dub | tr --delete '\n' | grep --ignore-case 'select.*0\.9\.20.*0\.9\.21.*'
+echo 1 | $DUB remove dub | tr -d '\n' | grep --ignore-case 'select.*0\.9\.20.*0\.9\.21.*'
if [ -d $HOME/.dub/packages/dub-0.9.20/dub ]; then
die $LINENO 'Failed to remove dub-0.9.20'
fi
diff --git a/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh b/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh
index 84468cd..6342d76 100755
--- a/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh
+++ b/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
if [ -n "${dub_issue616}" ]; then
echo 'Fail! preGenerateCommands recursion detected!' >&2
exit 0 # Don't return a non-zero error code here. This way the test gives a better diagnostic.
diff --git a/test/run-unittest.sh b/test/run-unittest.sh
index 312c9ea..78a9af5 100755
--- a/test/run-unittest.sh
+++ b/test/run-unittest.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+set -ueo pipefail
. $(dirname "${BASH_SOURCE[0]}")/common.sh
@@ -30,10 +31,11 @@
DC_BIN=$(basename "$DC")
CURR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
+FRONTEND="${FRONTEND:-}"
for script in $(ls $CURR_DIR/*.sh); do
if [ "$script" = "$(readlink -f ${BASH_SOURCE[0]})" ] || [ "$(basename $script)" = "common.sh" ]; then continue; fi
- if [ -e $script.min_frontend ] && [ ! -z ${FRONTEND:-} -a ${FRONTEND:-} \< $(cat $script.min_frontend) ]; then continue; fi
+ if [ -e $script.min_frontend ] && [ ! -z "$FRONTEND" ] && [ ${FRONTEND} \< $(cat $script.min_frontend) ]; then continue; fi
log "Running $script..."
DUB=$DUB DC=$DC CURR_DIR="$CURR_DIR" $script || logError "Script failure."
done
diff --git a/test/single-file-sdl-default-name.sh b/test/single-file-sdl-default-name.sh
index 1c61540..ab2ba8b 100755
--- a/test/single-file-sdl-default-name.sh
+++ b/test/single-file-sdl-default-name.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
set -e
cd ${CURR_DIR}
rm -f single-file-sdl-default-name