aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vmimage.subr
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-04-21 02:49:44 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-04-21 02:49:44 +0000
commitfa5696158827f18547be5f6b9ec49448b595d67d (patch)
tree2ae31512308897569e42a56a94c15c70163c55a8 /release/tools/vmimage.subr
parentc668010e3f0581abb55807023b2220e2d13b3f66 (diff)
downloadsrc-fa5696158827f18547be5f6b9ec49448b595d67d.tar.gz
src-fa5696158827f18547be5f6b9ec49448b595d67d.zip
Simplify variable expansion in attempt to fix the vm-image build.
Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=281809
Diffstat (limited to 'release/tools/vmimage.subr')
-rw-r--r--release/tools/vmimage.subr6
1 files changed, 3 insertions, 3 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 9cff4ecbd98a..d9c95c6f22aa 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -14,9 +14,9 @@ write_partition_layout() {
SWAPOPT="-p freebsd-swap/swapfs::1G"
fi
- _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)"
- if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then
- BOOTFILES="${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot"
+ _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR | tr -d '/usr/src')"
+ if [ -d "${_OBJDIR}/${TARGET}.${TARGET_ARCH}" ]; then
+ BOOTFILES="${_OBJDIR}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot"
else
BOOTFILES="${_OBJDIR}/usr/src/sys/boot"
fi