summaryrefslogtreecommitdiff
path: root/archive
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-05-14 13:51:27 +0200
committerErich Eckner <git@eckner.net>2019-05-14 13:51:27 +0200
commitb4e392fc2086e685c16c388c9736e95b8e749f4b (patch)
tree63fa1792769eaed63d0885c5493b7b445d4aa811 /archive
parent0a9763126f5cb385bf4428031a80206cafb9d23b (diff)
downloaddevops-b4e392fc2086e685c16c388c9736e95b8e749f4b.tar.xz
archive: make shellcheck happy
Diffstat (limited to 'archive')
-rwxr-xr-xarchive19
1 files changed, 12 insertions, 7 deletions
diff --git a/archive b/archive
index e7db9f0..4b7aef4 100755
--- a/archive
+++ b/archive
@@ -28,7 +28,7 @@ find "${master_mirror_root}/archisos" \
t
d
' \
- >> "${archive_root}/iso/${file##*/}"
+ | sponge -a "${archive_root}/iso/${file##*/}"
fi
[ -f "${archive_root}/iso/${file##*/}" ] && continue
ln "${file}" "${archive_root}/iso/${file##*/}"
@@ -39,12 +39,14 @@ find "${master_mirror_root}/pool" \
-mindepth 1 \
-maxdepth 1 \
-type f \
-| while read -r file; do
- target="${file##*/}"
- target="${archive_root}/packages/${target:0:1}/${target%-*-*-*}/${target}"
+| sed '
+ s,.*/\([^/]\)\([^/]*\)$,\0 \1 \1\2,
+' \
+| while read -r path initial file; do
+ target="${archive_root}/packages/${initial}/${file%-*-*-*}/${file}"
[ -f "${target}" ] && continue
mkdir -p "${target%/*}"
- ln "${file}" "${target}"
+ ln "${path}" "${target}"
done
# copy the repositories
@@ -74,9 +76,12 @@ if [ ! -d "${todays_path}" ]; then
-o -name '*.pkg.tar.xz.sig' \
\) \
-printf '%f\n' \
- | while read -r file; do
+ | sed '
+ s/^./\0 \0/
+ ' \
+ | while read -r initial file; do
ln -s \
- "../../../../../../packages/${file:0:1}/${file%-*-*-*}/${file}" \
+ "../../../../../../packages/${initial}/${file%-*-*-*}/${file}" \
"${todays_path}/${arch}/${repo}/${file}"
done
done