From 9182863f9c0c4d66b2e69f0afe3a5ff6235416a8 Mon Sep 17 00:00:00 2001 From: hak8or Date: Wed, 15 Nov 2017 00:28:55 -0500 Subject: [PATCH] Create a backup of mirrorlist only if needed --- arch_setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch_setup.sh b/arch_setup.sh index 03e9237..f0b6296 100644 --- a/arch_setup.sh +++ b/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