Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pacman-mirror-update 919B

5 anos atrás
123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Define tmpfile
  3. tmpfile=/tmp/mirrorlisttmp
  4. # Determine architecture type
  5. archtype=$(uname -m)
  6. # Get latest mirror list and save to tmpfile
  7. wget -O $tmpfile "http://www.archlinux.org/mirrorlist/?country=United+States&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on" >/dev/null 2>&1
  8. # Wrangle txt in saved file
  9. sed -i -e "s/^#Server/Server/g" -e "s/\$arch/"$archtype"/g" $tmpfile
  10. # Backup and replace current mirrorlist file
  11. if [[ ! -f /etc/pacman.d/mirrorlist.orig ]]; then
  12. mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig && echo "Successfully backed up original mirrorlist!"
  13. cp $tmpfile /etc/pacman.d/mirrorlist && echo "Successfully applied new mirrorlist!"
  14. else
  15. mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak && echo "Successfully backed up current mirrorlist!"
  16. cp $tmpfile /etc/pacman.d/mirrorlist && echo "Successfully applied new mirrorlist!"
  17. fi
  18. exit