command_install_resources_mta.sh 1.2 KB

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