Advertisement
Rnery

Proton-GE

Nov 21st, 2023
1,189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.78 KB | Source Code | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. print_error() {
  4.   echo "Erro: $1" >&2
  5. }
  6.  
  7. extract_proton_ge() {
  8.   tar xvzf "$1" -C "$2" || print_error "Falha ao extrair o Proton-GE."
  9. }
  10.  
  11. # Função para mover para a pasta compatibilitytools.d
  12. move_to_compatibilitytools() {
  13.   mv "$1" "$2" || print_error "Falha ao mover o Proton-GE para a pasta compatibilitytools.d."
  14. }
  15.  
  16. compatibilitytools_path="$HOME/.steam/root/compatibilitytools.d/"
  17.  
  18. if [ ! -d "$compatibilitytools_path" ]
  19. then
  20.   mkdir -p "$compatibilitytools_path" || print_error "Falha ao criar a pasta compatibilitytools.d."
  21. fi
  22.  
  23. proton_ge_archive="Proton-GE-*.tar.gz"
  24. extract_proton_ge "$proton_ge_archive" "$compatibilitytools_path"
  25. move_to_compatibilitytools "Proton-GE-*" "$compatibilitytools_path"
  26.  
  27. echo "Proton-GE instalado com sucesso!"
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement