force replace existing

This commit is contained in:
leca 2024-09-29 18:09:56 +03:00
parent be2870e0d4
commit bff468dd08
1 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ download_and_install_game() {
download_url=$(curl -X GET --silent "$API_URL/packages/${1}/" | jq ".url" | tr -d '"') download_url=$(curl -X GET --silent "$API_URL/packages/${1}/" | jq ".url" | tr -d '"')
cd games || exit cd games || exit
wget -O game.zip "${download_url}" wget -O game.zip "${download_url}"
unzip game.zip unzip -foqq game.zip
rm game.zip rm game.zip
cd ../ # data cd ../ # data
} }
@ -57,7 +57,7 @@ download_and_install_mod () {
mod_file="${mods_path}/mod.zip" mod_file="${mods_path}/mod.zip"
echo "Writing to ${mod_file} content from url ${mod_url}" echo "Writing to ${mod_file} content from url ${mod_url}"
wget -O "${mod_file}" "${mod_url}" wget -O "${mod_file}" "${mod_url}"
unzip "${mod_file}" -d "${mods_path}" unzip -foqq "${mod_file}" -d "${mods_path}"
rm "${mod_file}" rm "${mod_file}"
} }
@ -70,6 +70,7 @@ get_dependencies () {
amount_of_deps="${#deps_array[@]}" amount_of_deps="${#deps_array[@]}"
if [ "$amount_of_deps" -eq 0 ]; then if [ "$amount_of_deps" -eq 0 ]; then
calculated_dependencies+=("$1")
echo "No deps for mod" echo "No deps for mod"
return return
fi fi