uninstall.sh 828 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. script_dir=`dirname $0`
  3. source "${script_dir}"/common
  4. echo
  5. info "Removing the patch"
  6. echo
  7. info "Removing additional files"
  8. for additional_file in ${additional_files[@]}
  9. do
  10. if test -e "${additional_file}"; then
  11. info "Removing ${additional_file}"
  12. rm -r "${additional_file}"
  13. else
  14. warn "${additional_file} not found! Skipping"
  15. fi
  16. done
  17. echo
  18. info "Restoring game file backups"
  19. for game_file in ${game_files[@]}
  20. do
  21. if test -f "${game_file}.bak"; then
  22. info "Restoring ${game_file}"
  23. rm "${game_file}"
  24. mv "${game_file}.bak" "${game_file}"
  25. else
  26. warn "Backup for ${game_file} not found! Skipping"
  27. fi
  28. done
  29. echo
  30. info "Done"
  31. echo
  32. warn "The uninstaller does not remove logging servers from /etc/hosts. Please remove them manually"
  33. echo