summaryrefslogtreecommitdiff
path: root/update-archlinux32-package
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-12-05 20:56:28 +0100
committerErich Eckner <git@eckner.net>2018-12-05 20:56:28 +0100
commit95eba91567209824dd6beac290e06097fb328143 (patch)
tree4498cb459cb5cd9f42ad6c31ae00bf9f3f2c87f0 /update-archlinux32-package
parent683015b1a3f4ff422c52cc5cdfece725ce665f3b (diff)
downloaddevops-95eba91567209824dd6beac290e06097fb328143.tar.xz
update-archlinux32-package: update_paths ordered alphabetically
Diffstat (limited to 'update-archlinux32-package')
-rwxr-xr-xupdate-archlinux32-package118
1 files changed, 59 insertions, 59 deletions
diff --git a/update-archlinux32-package b/update-archlinux32-package
index 891cdf7..c9481f0 100755
--- a/update-archlinux32-package
+++ b/update-archlinux32-package
@@ -115,6 +115,65 @@ fi
ssh arch32-test 'rm -rf --one-file-system "'"${pkgname}"'"'
case ${update_path} in
+ 'archlinuxewe')
+ archlinuxewe_PKGBUILD=$(
+ git -C "${archlinuxewe_git_path}" archive HEAD -- "${pkgname}32/PKGBUILD" | \
+ tar -Ox
+ )
+ repo_arch=$(
+ printf '%s\n' "${archlinuxewe_PKGBUILD}" | \
+ grep '^arch=' | \
+ cut -d'=' -f2 | \
+ tr '()"'"'" '\n' | \
+ grep -xF 'x86_64' || \
+ echo any
+ )
+ old_pkgver=$(
+ grep '^pkgver=' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" | \
+ cut -d'=' -f2
+ )
+ if [ "${old_pkgver}" = "${new_pkgver}" ]; then
+ >&2 echo 'nothing to do'
+ exit
+ fi
+ new_pkgver=$(
+ printf '%s\n' "${archlinuxewe_PKGBUILD}" | \
+ grep '^pkgver=' | \
+ cut -d'=' -f2
+ )
+ sha512sums=$(
+ cd "${archlinuxewe_git_path}/${pkgname}32"
+ makepkg -g | \
+ sed '
+ s/^/\\1/
+ $! s/$/\\n/
+ ' | \
+ tr -d '\n'
+ )
+ sed -i '
+ s/^pkgver=.*/pkgver='"${new_pkgver}"'/
+ s/^pkgrel=.*/pkgrel=1/
+ /^\s*sha512sums=(/ {
+ :sum_loop
+ $b
+ N
+ s/^\(\s*\)sha512sums=(.*)/'"${sha512sums}"'/
+ T sum_loop
+ }
+ ' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"
+ scp -r "${upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}" \
+ "arch32-test:${pkgname}"
+ if ! ssh arch32-test '
+ cd "'"${pkgname}"'"
+ cat >> PKGBUILD
+ makepkg --verifysource
+ ' < \
+ "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"; then
+ >&2 echo 'something went wrong'
+ exit 1
+ fi
+ git -C "${git_repo_path}" commit "${repo}/${pkgname}/PKGBUILD" -m "${repo}/${pkgname}: ${old_pkgver} -> ${new_pkgver}"
+ ;;
'kernel without upstream')
infos=$(
"${base_dir}/watch-versions" "${pkgname}"
@@ -301,65 +360,6 @@ case ${update_path} in
)" "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"
git -C "${git_repo_path}/${repo}/${pkgname}" commit PKGBUILD ${config_names} -m "${repo}/${pkgname}: new version => new config => new checksum"
;;
- 'archlinuxewe')
- archlinuxewe_PKGBUILD=$(
- git -C "${archlinuxewe_git_path}" archive HEAD -- "${pkgname}32/PKGBUILD" | \
- tar -Ox
- )
- repo_arch=$(
- printf '%s\n' "${archlinuxewe_PKGBUILD}" | \
- grep '^arch=' | \
- cut -d'=' -f2 | \
- tr '()"'"'" '\n' | \
- grep -xF 'x86_64' || \
- echo any
- )
- old_pkgver=$(
- grep '^pkgver=' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" | \
- cut -d'=' -f2
- )
- if [ "${old_pkgver}" = "${new_pkgver}" ]; then
- >&2 echo 'nothing to do'
- exit
- fi
- new_pkgver=$(
- printf '%s\n' "${archlinuxewe_PKGBUILD}" | \
- grep '^pkgver=' | \
- cut -d'=' -f2
- )
- sha512sums=$(
- cd "${archlinuxewe_git_path}/${pkgname}32"
- makepkg -g | \
- sed '
- s/^/\\1/
- $! s/$/\\n/
- ' | \
- tr -d '\n'
- )
- sed -i '
- s/^pkgver=.*/pkgver='"${new_pkgver}"'/
- s/^pkgrel=.*/pkgrel=1/
- /^\s*sha512sums=(/ {
- :sum_loop
- $b
- N
- s/^\(\s*\)sha512sums=(.*)/'"${sha512sums}"'/
- T sum_loop
- }
- ' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"
- scp -r "${upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}" \
- "arch32-test:${pkgname}"
- if ! ssh arch32-test '
- cd "'"${pkgname}"'"
- cat >> PKGBUILD
- makepkg --verifysource
- ' < \
- "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"; then
- >&2 echo 'something went wrong'
- exit 1
- fi
- git -C "${git_repo_path}" commit "${repo}/${pkgname}/PKGBUILD" -m "${repo}/${pkgname}: ${old_pkgver} -> ${new_pkgver}"
- ;;
*)
>&2 printf 'Whoops, I thought I knew how to update %s, but apparently I don'"'"'t.\n' \
"${update_path}"