fix some smaller bugs

This commit is contained in:
Maximilian Keßler 2023-10-21 14:45:19 +02:00
parent cf49d82520
commit 0f5baa44ed
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -17,12 +17,12 @@ RSYNC_OPTIONS=(--links --safe-links "--info=del,progress2,remove,symsafe")
# Should not be changed, these files need to be synced in order for repo-add to work properly # Should not be changed, these files need to be synced in order for repo-add to work properly
REPO_FILES=("${REPO_NAME}".db.tar.gz "${REPO_NAME}".db.tar.gz.sig "${REPO_NAME}".files.tar.gz "${REPO_NAME}".files.tar.gz.sig REPO_FILES=("${REPO_NAME}".db.tar.gz "${REPO_NAME}".db.tar.gz.sig "${REPO_NAME}".files.tar.gz "${REPO_NAME}".files.tar.gz.sig
"${REPO_NAME}".db 0 "${REPO_NAME}".db.sig "${REPO_NAME}".files "${REPO_NAME}".files.sig) "${REPO_NAME}".db "${REPO_NAME}".db.sig "${REPO_NAME}".files "${REPO_NAME}".files.sig)
# Start script # Start script
mapfile -t packages < <(ls ./*pkg.tar.zst$) mapfile -t packages < <(ls ./*pkg.tar.zst)
mapfile -t sigs < <(ls ./*pkg.tar.zst.sig$) mapfile -t sigs < <(ls ./*pkg.tar.zst.sig)
mkdir -p $TMP_REPO_ROOT mkdir -p $TMP_REPO_ROOT
@ -36,13 +36,13 @@ remote_files=()
for f in "${REPO_FILES[@]}"; do for f in "${REPO_FILES[@]}"; do
remote_files+=("${REMOTE_REPO_ROOT}/$f") remote_files+=("${REMOTE_REPO_ROOT}/$f")
done done
rsync "${RSYNC_OPTIONS[@]}" "${remote_files[@]}" "${TMP_REPO_ROOT}" rsync --ignore-missing-args "${RSYNC_OPTIONS[@]}" "${remote_files[@]}" "${TMP_REPO_ROOT}"
# update repo locally # update repo locally
echo "[deploy] Updating repository locally" echo "[deploy] Updating repository locally"
cp "${packages[@]}" "${TMP_REPO_ROOT}" cp "${packages[@]}" "${TMP_REPO_ROOT}"
cp "${sigs[@]}" "${TMP_REPO_ROOT}" cp "${sigs[@]}" "${TMP_REPO_ROOT}"
repo-add --new --remove --verify --sign ${TMP_REPO_ROOT}/mkessler-arch.db.tar.gz "${packages[*]}" repo-add --new --remove --verify --sign "${TMP_REPO_ROOT}/${REPO_NAME}.db.tar.gz" "${packages[*]}"
# sync repo to remote # sync repo to remote
echo "[deploy] Syncing changes to remote" echo "[deploy] Syncing changes to remote"