2022-08-10 00:00:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
if [ -f "$1/modscript" ]; then
|
|
|
|
source "$1/modscript" "$2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "$1/data" ]; then
|
|
|
|
cp --reflink=auto -rf "$1/data/." "$2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$2/chroot" ]; then
|
|
|
|
wdvn-chroot "$2" "/chroot"
|
|
|
|
rm "$2/chroot"
|
2023-04-09 07:11:56 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$2/chroot-out" ]; then
|
|
|
|
source "$2/chroot-out"
|
|
|
|
rm "$2/chroot-out"
|
|
|
|
fi
|
|
|
|
|