diff options
Diffstat (limited to 'misc/PKGBUILD-appendix-for-archive-server')
-rw-r--r-- | misc/PKGBUILD-appendix-for-archive-server | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/misc/PKGBUILD-appendix-for-archive-server b/misc/PKGBUILD-appendix-for-archive-server new file mode 100644 index 0000000..3fcb5ba --- /dev/null +++ b/misc/PKGBUILD-appendix-for-archive-server @@ -0,0 +1,32 @@ +for ((i=0; i<${#source[@]}; i++)); do + infos=$( + printf '%s\n' "${source[${i}]}" | \ + sed -n ' + s@^\([^:]\+\)::git+\(https://git\.archlinux\.org/linux.git\)?\(signed\)#\(tag=\S\+\)$@\1 \2 \3 \4@ + T + p + ' + ) + if [ -n "${infos}" ]; then + source[${i}]=$( + printf '%s.tar.gz::https://archive-server.archlinux32.org/?p=' \ + "${infos%% *}" + printf '%s/' "${infos%% *}" | \ + base64 -w0 | \ + sed 's/=/%3D/g' + printf '&r=' + infos="${infos#* }" + printf '%s' "${infos%% *}" | \ + base64 -w0 | \ + sed 's/=/%3D/g' + infos="${infos#* }" + if [ "${infos%% *}" = 'signed' ]; then + infos="${infos#* }" + printf '&valid_keys=' + printf '%s,' "${validpgpkeys[@]}" | \ + sed 's/,$//' + fi + printf '&%s\n' "${infos}" + ) + fi +done |