Update 'update-mods.sh'

This commit is contained in:
Samuel Philipp 2021-03-06 21:37:36 +00:00
parent 3678447de5
commit f280ba75a5

View file

@ -9,12 +9,13 @@ while IFS="" read -r line || [ -n "$line" ]
do
IFS=' ' read -ra mod <<< "$line"
echo "downloading ${mod[0]}"
sleep 1
wget -q "${mod[1]}" -O temp.zip
echo "extracting ${mod[0]}"
unzip -oq temp.zip -d temp
rm -rf "$BASE/${mod[0]}/"
mkdir -p "$BASE/${mod[0]}/"
if [[ $(find temp/* -maxdepth 0 -type d | wc -l) == 1 ]]; then
if [[ $(find temp/* -maxdepth 0 | wc -l) == 1 ]]; then
cp -r temp/*/* "$BASE/${mod[0]}"
else
cp -r temp/* "$BASE/${mod[0]}"