Skip to content

Commit 06b3d29

Browse files
AnInternetTrollclassabbyamp
authored andcommitted
xmirror.in: fix failing if xbps-install doesn't sync
1 parent 943d029 commit 06b3d29

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

xmirror.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,16 @@ ${BOLD}Do you want to continue?${RESET}" 20 80 || return
153153
}
154154

155155
write_mirrors() {
156-
set -e
157156
local REPOSITORY="$1"
158157
if ! [[ "$REPOSITORY" = *"://"* ]]; then
159158
log "warning: mirror protocol not specified, assuming http://"
160159
REPOSITORY="http://$REPOSITORY"
161160
fi
162161
mkdir -p "${ROOTDIR}/etc/xbps.d"
163162
cp --no-preserve=mode,ownership --backup=simple --suffix=.old \
164-
"${ROOTDIR}/usr/share/xbps.d"/*-repository-*.conf "${ROOTDIR}/etc/xbps.d/"
165-
sed -i "s|https://repo-default.voidlinux.org|${REPOSITORY%/}|g" "${ROOTDIR}/etc/xbps.d"/*-repository-*.conf
163+
"${ROOTDIR}/usr/share/xbps.d"/*-repository-*.conf "${ROOTDIR}/etc/xbps.d/" &&
164+
sed -i "s|https://repo-default.voidlinux.org|${REPOSITORY%/}|g" "${ROOTDIR}/etc/xbps.d"/*-repository-*.conf &&
166165
$XBPS_INSTALL -S -r "${ROOTDIR}"
167-
set +e
168166
}
169167

170168
reset_mirrors_int() {

0 commit comments

Comments
 (0)