Created
November 16, 2021 23:49
-
-
Save ConnorMcF/90e6705f6d2f10402feea30629c8bd4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -A mods | |
# ==== EDIT BELOW ==== | |
steam_user="connormcf10" | |
download_mbps="1000" | |
steamcmd_path="/home/mcserver/Steam" | |
arma3_path="/home/mcserver/arma3" | |
# important on Linux | |
lowercase_files=1 | |
# list of mods | |
# mods[<MOD NAME>]=<STEAM WORKSHOP ID> | |
mods[ace]=463939057 | |
mods[ace3_ext_animsactions]=766491311 | |
mods[ace3_ext_placeables]=866772689 | |
mods[adv_ai_command]=685037021 | |
mods[adv_rappelling]=713709341 | |
mods[adv_sling_loading]=615007497 | |
mods[adv_towing]=639837898 | |
mods[adv_urban_rappelling]=730310357 | |
mods[cba_a3]=450814997 | |
mods[cup_terrains_core]=583496184 | |
mods[cup_terrains_maps]=583544987 | |
mods[cup_units]=497661914 | |
mods[cup_vehicles]=541888371 | |
mods[cup_weapons]=497660133 | |
mods[cup_ace3_compat_vehicles]=621650475 | |
mods[cup_ace3_compat_weapons]=549676314 | |
mods[mountain_wilderness_terrain]=883340794 | |
mods[mrb_air_visibility]=929396506 | |
mods[mrb_vehicle_visibility]=930903722 | |
mods[dynamic_view_distance]=1360202407 | |
mods[enhanced_movement]=333310405 | |
mods[mcc_sandbox4]=338988835 | |
mods[personal_arsenal]=457905859 | |
mods[task_force_radio]=620019431 | |
# dont care | |
mods[antimat_rifle]=933340798 | |
mods[bg21_famas]=536544384 | |
# ==== EDIT ABOVE ==== | |
STEAMCMD_MODS="" | |
MODLIST="" | |
for mod in "${!mods[@]}"; do | |
echo "${mod}: ${mods[$mod]}"; | |
STEAMCMD_MODS="${STEAMCMD_MODS} +\"workshop_download_item 107410 ${mods[$mod]}\"" | |
MODLIST="${MODLIST}@${mod};" | |
done | |
echo $STEAMCMD_MODS | |
STEAMCMD="${steamcmd_path}/steamcmd.sh +login ${steam_user} +force_install_dir ${arma3_path} +app_update 233780 ${STEAMCMD_MODS} validate +quit" | |
eval $STEAMCMD | |
echo -e "\n===\nSTEAM DOWNLOAD COMPLETE\n===\n" | |
for mod in "${!mods[@]}"; do | |
MODPATH="${arma3_path}/steamapps/workshop/content/107410/${mods[$mod]}" | |
echo "Symlinking @${mod}" | |
rm -f ${arma3_path}/@${mod} | |
ln -s ${MODPATH} ${arma3_path}/@${mod} | |
if [[ $lowercase_files -eq 1 ]]; then | |
echo "Lowercasing @${mod}" | |
pushd ${MODPATH} | |
for f in `find`; do mv -v "$f" "`echo $f | tr '[A-Z]' '[a-z]'`"; done | |
popd | |
fi | |
done | |
echo "Great success? Here is your command:" | |
echo "-mod=${MODLIST::-1}" | tee a3modlistcmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment