Browse Source

Update 'update-mods.sh'

master
Samuel Philipp 8 months ago
parent
commit
f280ba75a5
  1. 3
      update-mods.sh

3
update-mods.sh

@ -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]}"

Loading…
Cancel
Save