Create a backup of mirrorlist only if needed

rewrite
hak8or 5 years ago
parent 13fb7a54bd
commit 9182863f9c
  1. 6
      arch_setup.sh

@ -36,8 +36,10 @@ pacman-key --populate archlinux > $LOGFILE 2>&1
# Setup mirrors, hardcoded for now. Could have been done with rankmirror
# with USA and worldwide mirrors but eh.
echo "$TAGSTR Setting up mirror list"
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup > $LOGFILE 2>&1
cat <<- 'EOM05594313219813' > /etc/pacman.d/mirrorlist
if [[ -e /etc/pacman.d/mirrorlist ]]; then
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup # > $LOGFILE 2>&1
fi
cat <<- 'EOM05594313219813' > /etc/pacman.d/mirrorlist
# Server list generated by rankmirrors on 2017-11-03
##
## Arch Linux repository mirrorlist

Loading…
Cancel
Save