aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-11-20 23:27:43 -0600
committerRob Landley <rob@landley.net>2019-11-20 23:27:43 -0600
commit1f14e20a24b172fecbb5d301be4deb4d1c8648a6 (patch)
tree2a31f339d4cfdbd996a6333f5cdc6cf849e4c73d
parent54a2d045a1be4aa3412a7719890df0574ad02f50 (diff)
downloadtoybox-1f14e20a24b172fecbb5d301be4deb4d1c8648a6.tar.gz
Ahem: work when PREFIX hasn't got trailing / OR when PREFIX is blank.
-rwxr-xr-xscripts/single.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/single.sh b/scripts/single.sh
index c8a04836..a0f2c571 100755
--- a/scripts/single.sh
+++ b/scripts/single.sh
@@ -41,6 +41,7 @@ do
echo "# CONFIG_TOYBOX is not set" >> "$KCONFIG_CONFIG" &&
grep "CONFIG_TOYBOX_" .config >> "$KCONFIG_CONFIG" &&
- rm -f "$PREFIX/$i" &&
- OUTNAME="$PREFIX/$i" scripts/make.sh || exit 1
+ export OUTNAME="${PREFIX:+/$PREFIX}$i"
+ rm -f "$OUTNAME" &&
+ scripts/make.sh || exit 1
done