From 17910b92b762000663c665fedbab30f7b1d41bdf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 20 Apr 2024 18:34:05 +0200 Subject: Adding upstream version 39. Signed-off-by: Daniel Baumann --- development/test | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 development/test (limited to 'development/test') diff --git a/development/test b/development/test new file mode 100755 index 0000000..101f6a1 --- /dev/null +++ b/development/test @@ -0,0 +1,30 @@ +#!/bin/sh -e + +tmp_cleanup() { + [ -d "$BASE" ] || return + mountpoint -q "$BASE" || return + umount -l $BASE + rmdir $BASE +} + +trap "tmp_cleanup" 0 1 2 3 15 + +BASE=$(mktemp -d) +mount -t tmpfs tmpfs $BASE -o mode=755,size=401276k +mkdir $BASE/delta/ $BASE/.work/ $BASE/root/ + +if [ "$1" ]; then + base_dir="$1" +else + base_dir='/' +fi + +mount -t overlay overlay $BASE/root/ \ + -o workdir=$BASE/.work,lowerdir=$base_dir,upperdir=$BASE/delta + +systemd-nspawn --setenv=LANG=C.UTF-8 \ + --tmpfs=/tmp/:mode=1777 \ + --bind=/var/cache/apt/archives/ \ + --register=no \ + --directory=$BASE/root/ || true + -- cgit v1.2.3