#!/bin/sh _name='localcdn' pkgname="webext-${_name}-chromium" url='https://codeberg.org/nobody/LocalCDN/' version="$(wget -o /dev/null -O- https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes | grep -m 1 xpi | sed 's!.*/firefox/downloads/file/!!;s!\.xpi.*!!;s!.*-!!')" echo "$version" wget -c -O "${pkgname}_${version}.zip" "${url}archive/v${version}.zip" hash="$(b2sum "${pkgname}_${version}.zip" | cut -d ' ' -f 1)" echo "$hash" sed -i "s!pkgver=.*!pkgver=\"$version\"!;s!b2sums=.*!b2sums=\(\'$hash\'\)!" PKGBUILD