xbps-src: unbreak chroot-style scripts.
This commit is contained in:
parent
c7f21fd595
commit
ed6345f938
3 changed files with 12 additions and 18 deletions
|
@ -6,19 +6,17 @@ readonly MASTERDIR="$1"
|
|||
readonly DISTDIR="$2"
|
||||
readonly HOSTDIR="$3"
|
||||
readonly EXTRA_ARGS="$4"
|
||||
readonly COMMAND="$5"
|
||||
shift 5
|
||||
readonly COMMAND_ARGS="$@"
|
||||
shift 4
|
||||
|
||||
if ! command -v proot >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$MASTERDIR" -o -z "$DISTDIR" -o -z "$COMMAND" ]; then
|
||||
echo "$0 MASTERDIR/DISTDIR/COMMAND not set"
|
||||
if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
|
||||
echo "$0 MASTERDIR/DISTDIR not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec proot -r $XBPS_MASTERDIR -w / -b $DISTDIR:/void-packages \
|
||||
${HOSTDIR:+-b $HOSTDIR:/host} -b /proc:/proc -b /dev:/dev \
|
||||
-b /sys:/sys $EXTRA_ARGS $COMMAND $COMMAND_ARGS
|
||||
-b /sys:/sys $EXTRA_ARGS $@
|
||||
|
|
|
@ -6,17 +6,15 @@ readonly MASTERDIR="$1"
|
|||
readonly DISTDIR="$2"
|
||||
readonly HOSTDIR="$3"
|
||||
readonly EXTRA_ARGS="$4"
|
||||
readonly COMMAND="$5"
|
||||
shift 5
|
||||
readonly COMMAND_ARGS="$@"
|
||||
shift 4
|
||||
|
||||
if ! command -v xbps-uchroot >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$MASTERDIR" -o -z "$DISTDIR" -o -z "$COMMAND" ]; then
|
||||
echo "$0 MASTERDIR/DISTDIR/COMMAND not set"
|
||||
if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
|
||||
echo "$0 MASTERDIR/DISTDIR not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec xbps-uchroot $EXTRA_ARGS -D $DISTDIR ${HOSTDIR:+-H $HOSTDIR} $XBPS_MASTERDIR $COMMAND $COMMAND_ARGS
|
||||
exec xbps-uchroot $EXTRA_ARGS -D $DISTDIR ${HOSTDIR:+-H $HOSTDIR} $MASTERDIR $@
|
||||
|
|
|
@ -6,17 +6,15 @@ readonly MASTERDIR="$1"
|
|||
readonly DISTDIR="$2"
|
||||
readonly HOSTDIR="$3"
|
||||
readonly EXTRA_ARGS="$4"
|
||||
readonly COMMAND="$5"
|
||||
shift 5
|
||||
readonly COMMAND_ARGS="$@"
|
||||
shift 4
|
||||
|
||||
if ! command -v xbps-uunshare >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$MASTERDIR" -o -z "$DISTDIR" -o -z "$COMMAND" ]; then
|
||||
echo "$0 MASTERDIR/DISTDIR/COMMAND not set"
|
||||
if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
|
||||
echo "$0 MASTERDIR/DISTDIR not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec xbps-uunshare $EXTRA_ARGS -D $DISTDIR ${HOSTDIR:+-H $HOSTDIR} $XBPS_MASTERDIR $COMMAND $COMMAND_ARGS
|
||||
exec xbps-uunshare $EXTRA_ARGS -D $DISTDIR ${HOSTDIR:+-H $HOSTDIR} $MASTERDIR $@
|
||||
|
|
Loading…
Reference in a new issue