index : devops | |
Archlinux32 devs' convenience-scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-05-14 13:51:27 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-14 13:51:27 +0200 |
commit | b4e392fc2086e685c16c388c9736e95b8e749f4b (patch) | |
tree | 63fa1792769eaed63d0885c5493b7b445d4aa811 /archive | |
parent | 0a9763126f5cb385bf4428031a80206cafb9d23b (diff) |
-rwxr-xr-x | archive | 19 |
@@ -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 |