command_install_resources_mta.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233
  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. commandname="DEFAULT-RESOURCES"
  7. commandaction="Default Resources"
  8. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  9. fn_firstcommand_set
  10. fn_install_resources(){
  11. echo -e ""
  12. echo -e "Installing Default Resources"
  13. echo -e "================================="
  14. fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5"
  15. fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}"
  16. echo -e "Default Resources Installed."
  17. }
  18. fn_print_header
  19. if [ -z "${autoinstall}" ]; then
  20. fn_print_warning_nl "Installing the default resources with existing resources may cause issues."
  21. if fn_prompt_yn "Do you want to install MTA default resources?" Y; then
  22. fn_install_resources
  23. fi
  24. else
  25. fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install."
  26. fn_print_information_nl "To install default resources use ./${selfname} install"
  27. fi
  28. core_exit.sh