Allow to re-apply mods to a pre-existing chroot
This commit is contained in:
parent
1a58810964
commit
a35257bfd2
@ -1,13 +1,27 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
mkdir -p "$1"
|
if [[ -d "$1.tmp" ]]; then
|
||||||
wdvn-get "$1"
|
rm -r -f "$1.tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ -d "$1" ]]; then
|
||||||
|
mkdir -p "$1.tmp"
|
||||||
|
wdvn-get "$1.tmp"
|
||||||
|
mv "$1.tmp" "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f "$1/chroot" ]]; then
|
||||||
|
rm -f "$1/chroot"
|
||||||
|
fi
|
||||||
|
|
||||||
for WDVN_MODLIST in "${@:2}"
|
for WDVN_MODLIST in "${@:2}"
|
||||||
do
|
do
|
||||||
|
echo "-- $WDVN_MODLIST --"
|
||||||
while IFS="" read -r WDVN_LINE || [ -n "$WDVN_LINE" ]
|
while IFS="" read -r WDVN_LINE || [ -n "$WDVN_LINE" ]
|
||||||
do
|
do
|
||||||
echo "> $WDVN_LINE ..."
|
echo "> $WDVN_LINE"
|
||||||
source wdvn-mod "mods/$WDVN_LINE" "$1"
|
source wdvn-mod "mods/$WDVN_LINE" "$1"
|
||||||
done < "modlists/$WDVN_MODLIST"
|
done < "modlists/$WDVN_MODLIST"
|
||||||
done
|
done
|
||||||
|
echo "-- CLEANUP --"
|
||||||
wdvn-clean "$1"
|
wdvn-clean "$1"
|
Loading…
Reference in New Issue
Block a user