aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-11-22 08:47:35 -0600
committerRob Landley <rob@landley.net>2019-11-22 08:47:35 -0600
commitcbab19ba55cf06140a97e217f9fa07d1fe809c6b (patch)
tree41ebb46eca2cd1d3495519c43c1911d97640272b /scripts
parentc77b66455762f42bb824c1aa8cc60e7f4d44bdab (diff)
downloadtoybox-cbab19ba55cf06140a97e217f9fa07d1fe809c6b.tar.gz
Sigh. Third attempt to fix trailing slashes in singlemake PREFIX.
(So much jetlag.)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/single.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/single.sh b/scripts/single.sh
index a0f2c571..98a7af30 100755
--- a/scripts/single.sh
+++ b/scripts/single.sh
@@ -8,6 +8,9 @@ then
exit 1
fi
+# Add trailing / to PREFIX when it's set but hasn't got one
+[ "$PREFIX" == "${PREFIX%/}" ] && PREFIX="${PREFIX:+$PREFIX/}"
+
# Harvest TOYBOX_* symbols from .config
if [ ! -e .config ]
then
@@ -41,7 +44,7 @@ do
echo "# CONFIG_TOYBOX is not set" >> "$KCONFIG_CONFIG" &&
grep "CONFIG_TOYBOX_" .config >> "$KCONFIG_CONFIG" &&
- export OUTNAME="${PREFIX:+/$PREFIX}$i"
+ export OUTNAME="$PREFIX$i"
rm -f "$OUTNAME" &&
scripts/make.sh || exit 1
done