summaryrefslogtreecommitdiffstats
path: root/src/index.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.sh')
-rw-r--r--src/index.sh23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/index.sh b/src/index.sh
index 9711af5..62208b9 100644
--- a/src/index.sh
+++ b/src/index.sh
@@ -126,7 +126,6 @@ update_feeds()
local archplat=
local sect_dirent=
local sect=
- local manifest_entry=
local hash_dirent=
local idx=
@@ -142,7 +141,6 @@ update_feeds()
dist="${chan##*_}"
chan="${chan%_*}"
suite="${base_dir}/feeds/${chan}/${dist}"
- exec 3>"${suite}/Manifest~"
# For each archplat:
for archplat_dirent in "${suite_dirent}/"*_*/; do
if [ ! -d "${archplat_dirent}" ]; then
@@ -163,7 +161,6 @@ update_feeds()
info_v "$(get_msg 'updating_feed')" \
"${chan}" "${dist}" \
"${arch}" "${plat}" "${sect}"
- manifest_entry="${arch}/${plat}/${sect}"
sect="${archplat}/${sect}"
# For each package name hash:
for hash_dirent in "${sect_dirent}/"*; do
@@ -193,7 +190,6 @@ update_feeds()
1>"${sect}/Packages.gz"
fi
feed_sign "${sect}/Packages"
- printf '%s\n' "${manifest_entry}" 1>&3
else
rm -f -- "${sect}/Packages" \
"${sect}/Packages.gz"
@@ -206,14 +202,17 @@ update_feeds()
try_rmdir "${archplat%/*}" || :
done
rmdir -- "${suite_dirent}"
- exec 3>&-
- if [ -s "${suite}/Manifest~" ]; then
- mv -- "${suite}/Manifest~" "${suite}/Manifest"
- else
- rm -f -- "${suite}/Manifest~" "${suite}/Manifest"
- rmdir -- "${suite}"
- rmdir -- "${suite%/*}" 2>/dev/null || :
- fi
+ try_rmdir "${suite}"
+ try_rmdir "${suite%/*}"
+ done
+
+ # Generate all suites' arch/plat/sect manifests.
+ for suite_dirent in "${base_dir}/feeds/"*/*/; do
+ (
+ cd "${suite_dirent}"
+ printf '%s\n' */*/* >'Manifest~'
+ mv 'Manifest~' 'Manifest'
+ )
done
return 0