diff options
author | Rob Landley <rob@landley.net> | 2019-11-20 23:27:43 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-11-20 23:27:43 -0600 |
commit | 1f14e20a24b172fecbb5d301be4deb4d1c8648a6 (patch) | |
tree | 2a31f339d4cfdbd996a6333f5cdc6cf849e4c73d | |
parent | 54a2d045a1be4aa3412a7719890df0574ad02f50 (diff) | |
download | toybox-1f14e20a24b172fecbb5d301be4deb4d1c8648a6.tar.gz |
Ahem: work when PREFIX hasn't got trailing / OR when PREFIX is blank.
-rwxr-xr-x | scripts/single.sh | 5 |
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 |