docker/bootstrap: Add sysroot stage flag to chroot tool
Change-Id: I7a6303cb11756b66d6d3379063f2402b3b38b7c6
This commit is contained in:
+12
-3
@@ -1,17 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
echo "usage: $0 <recipe>"
|
echo "usage: $0 <recipe> [sysroot-stage number]"
|
||||||
|
echo "Enters a haikuporter bootstrap chroot."
|
||||||
|
echo "Optionally, specify the sysroot-stage (default 1)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
STAGE="stage1"
|
||||||
|
if [ $# -eq 2 ]; then
|
||||||
|
STAGE=stage$2
|
||||||
|
fi
|
||||||
|
|
||||||
export GENERATED=$WORKPATH/generated.$TARGET_ARCH
|
export GENERATED=$WORKPATH/generated.$TARGET_ARCH
|
||||||
export LD_LIBRARY_PATH=$GENERATED/objects/linux/lib/:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$GENERATED/objects/linux/lib/:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
# A hack to fix haikuport chroot not liking Debian's fancy PS1
|
# A hack to fix haikuport chroot not liking Debian's fancy PS1
|
||||||
export PS1='\u@\h:\w\$'
|
export PS1='\u@\h:\w\$'
|
||||||
|
|
||||||
|
echo "Entering chroot with $STAGE chroot..."
|
||||||
|
|
||||||
$WORKPATH/src/haikuporter/haikuporter \
|
$WORKPATH/src/haikuporter/haikuporter \
|
||||||
--config=$GENERATED/objects/haiku/$TARGET_ARCH/packaging/repositories/HaikuPortsCross-build/haikuports.conf \
|
--config=$GENERATED/objects/haiku/$TARGET_ARCH/packaging/repositories/HaikuPortsCross-build/haikuports.conf \
|
||||||
--cross-devel-package $GENERATED/objects/haiku/$TARGET_ARCH/packaging/packages/haiku_cross_devel_sysroot_stage1_$TARGET_ARCH.hpkg \
|
--cross-devel-package $GENERATED/objects/haiku/$TARGET_ARCH/packaging/packages/haiku_cross_devel_sysroot_$STAGE_$TARGET_ARCH.hpkg \
|
||||||
--enter-chroot $1
|
--enter-chroot $1
|
||||||
|
|||||||
Reference in New Issue
Block a user