Skip to content

Commit

Permalink
Do not zero repo files if wget fails
Browse files Browse the repository at this point in the history
  • Loading branch information
philclifford authored and flexiondotorg committed Apr 15, 2024
1 parent e458a60 commit 4989454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deb-get
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ function update_repos() {
# export REPO ETC_DIR ELEVATE # no longer needed, `| bash -` replaced with `eval`
fancy_message info "Updating ${ETC_DIR}/${REPO}"
REPO_URL="$(head -n 1 "${ETC_DIR}/${REPO}.repo")"
${ELEVATE} wget ${WGET_VERBOSITY} ${WGET_TIMEOUT} "${REPO_URL}/manifest" -O "${ETC_DIR}/${REPO}.repo"
${ELEVATE} wget ${WGET_VERBOSITY} ${WGET_TIMEOUT} "${REPO_URL}/manifest" -O "${ETC_DIR}/${REPO}.repo.tmp" && ${ELEVATE} mv "${ETC_DIR}/${REPO}.repo.tmp" "${ETC_DIR}/${REPO}.repo"

# ${ELEVATE} rm "${ETC_DIR}/${REPO}.d/* # we currently leave old litter : either <- this or maybe rm older ones
# although so long as manifest is good we are OK
Expand Down

0 comments on commit 4989454

Please # to comment.