void-packages/common/chroot-style/uunshare.sh
Juan RP ff1a547ee2 Revert "chroot-style: u{chroot,unshare}: set POSIXLY_CORRECT to behave in POSIX mode."
This reverts commit 5a4c1c4ebe.

Breaks xbps-src -a target ..., so revert this for now.
2015-06-07 10:52:48 +02:00

22 lines
471 B
Bash
Executable file

#!/bin/sh
#
# This chroot script uses xbps-uunshare(8) with user_namespaces(7).
#
readonly MASTERDIR="$1"
readonly DISTDIR="$2"
readonly HOSTDIR="$3"
readonly EXTRA_ARGS="$4"
readonly CMD="$5"
shift 5
if ! command -v xbps-uunshare >/dev/null 2>&1; then
exit 1
fi
if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
echo "$0 MASTERDIR/DISTDIR not set"
exit 1
fi
exec xbps-uunshare $EXTRA_ARGS -b $DISTDIR:/void-packages ${HOSTDIR:+-b $HOSTDIR:/host} $MASTERDIR $CMD -- $@