command_install_resources_mta.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. # LinuxGSM command_install_resources_mta.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Installs the default resources for Multi Theft Auto.
  6. local modulename="DEFAULT_RESOURCES"
  7. local commandaction="Default Resources"
  8. local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
  9. fn_install_resources(){
  10. echo -e ""
  11. echo -e "Installing Default Resources"
  12. echo -e "================================="
  13. fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5"
  14. fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}"
  15. echo -e "Default Resources Installed."
  16. }
  17. fn_print_header
  18. if [ -z "${autoinstall}" ]; then
  19. fn_print_warning_nl "Installing the default resources with existing resources may cause issues."
  20. if fn_prompt_yn "Do you want to install MTA default resources?" Y; then
  21. fn_install_resources
  22. fi
  23. else
  24. fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install."
  25. fn_print_information_nl "To install default resources use ./${selfname} install"
  26. fi
  27. core_exit.sh