From 8a3a006aca3e987dadfb4d2adcc592675933c730 Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Sun, 7 Jul 2024 19:42:07 +0200 Subject: [PATCH] xmirror.in: fix failing if xbps-install doesn't sync --- xmirror.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xmirror.in b/xmirror.in index 56d3623..cc0f78d 100755 --- a/xmirror.in +++ b/xmirror.in @@ -153,7 +153,6 @@ ${BOLD}Do you want to continue?${RESET}" 20 80 || return } write_mirrors() { - set -e local REPOSITORY="$1" if ! [[ "$REPOSITORY" = *"://"* ]]; then log "warning: mirror protocol not specified, assuming http://" @@ -161,10 +160,9 @@ write_mirrors() { fi mkdir -p "${ROOTDIR}/etc/xbps.d" cp --no-preserve=mode,ownership --backup=simple --suffix=.old \ - "${ROOTDIR}/usr/share/xbps.d"/*-repository-*.conf "${ROOTDIR}/etc/xbps.d/" - sed -i "s|https://repo-default.voidlinux.org|${REPOSITORY%/}|g" "${ROOTDIR}/etc/xbps.d"/*-repository-*.conf + "${ROOTDIR}/usr/share/xbps.d"/*-repository-*.conf "${ROOTDIR}/etc/xbps.d/" && + sed -i "s|https://repo-default.voidlinux.org|${REPOSITORY%/}|g" "${ROOTDIR}/etc/xbps.d"/*-repository-*.conf && $XBPS_INSTALL -S -r "${ROOTDIR}" - set +e } reset_mirrors_int() {