ca-certificates: update to 20240203+3.101.1.
[void-pkg.git] / common / chroot-style / uunshare.sh
blob4d5146445fd2d0442a9ea168c83312b0cdfadd88
1 #!/bin/sh
3 # This chroot script uses xbps-uunshare(1) with user_namespaces(7).
5 readonly MASTERDIR="$1"
6 readonly DISTDIR="$2"
7 readonly HOSTDIR="$3"
8 readonly EXTRA_ARGS="$4"
9 readonly CMD="$5"
10 shift 5
12 if ! command -v xbps-uunshare >/dev/null 2>&1; then
13 exit 1
16 if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
17 echo "$0 MASTERDIR/DISTDIR not set"
18 exit 1
21 exec xbps-uunshare $EXTRA_ARGS -b $DISTDIR:/void-packages ${HOSTDIR:+-b $HOSTDIR:/host} -- $MASTERDIR $CMD $@