Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/misc/PKGBUILD-appendix-for-archive-server
blob: 3fcb5baeb1058097ee1af266ae226b9b19867c04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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