windvn/path/wdvn-make

36 lines
584 B
Plaintext
Raw Normal View History

2022-08-10 00:00:49 +00:00
#!/bin/bash
2023-04-09 08:37:47 +00:00
(
set -e
if [[ -d "$1.tmp" ]]; then
rm -r -f "$1.tmp"
fi
2023-04-09 08:37:47 +00:00
if ! [[ -d "$1" ]]; then
mkdir -p "$1.tmp"
wdvn-get "$1.tmp"
mv "$1.tmp" "$1"
fi
2023-04-09 08:37:47 +00:00
if [[ -f "$1/chroot" ]]; then
rm -f "$1/chroot"
fi
2023-04-09 08:37:47 +00:00
for WDVN_MODLIST in "${@:2}"
2022-08-10 00:00:49 +00:00
do
2023-04-09 08:37:47 +00:00
echo "-- $WDVN_MODLIST --"
while IFS="" read -r WDVN_LINE || [ -n "$WDVN_LINE" ]
do
echo "> $WDVN_LINE"
source wdvn-mod "mods/$WDVN_LINE" "$1"
done < "modlists/$WDVN_MODLIST"
done
echo "-- CLEANUP --"
wdvn-clean "$1"
)
rtn=$?
wdvn-chroot-end "$1"
find "$1" -name ".wdvn-placeholder" -type f -delete
exit $rtn