diff options
author | m.honel | 2021-06-02 18:37:18 +0200 |
---|---|---|
committer | m.honel | 2021-06-02 18:37:18 +0200 |
commit | df0619da4a82e802dcb36506d5254f83a880b212 (patch) | |
tree | bc624397c9af39c2c5d8f1ddb8f66b233330f25f | |
parent | 83cd7ceb8188cc87113b89954dc97bb0a3afe0ce (diff) | |
download | aur-df0619da4a82e802dcb36506d5254f83a880b212.tar.gz |
Add quick and dirty update script
-rwxr-xr-x | update.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/update.sh b/update.sh new file mode 100755 index 000000000000..c71b48feae02 --- /dev/null +++ b/update.sh @@ -0,0 +1,19 @@ +#!/bin/env sh + +repo_url=http://repos.tixeo.com/debian/pool/non-free/t/tixeoclient/ +latest_deb_name=$(curl -s ${repo_url} | \ + grep 'amd64\.deb' | \ + cut -d'"' -f2 | \ + tail -1 | \ + tr -d "\n") +latest_deb_url="${repo_url}${latest_deb_name}" +wget -qO "${latest_deb_name}" "${latest_deb_url}" | cut -d' ' -f1 +md5=$(md5sum -b "${latest_deb_name}" | cut -d' ' -f1) +rm "${latest_deb_name}" +pkgver=$(echo "${latest_deb_name}" | cut -d_ -f2) +sed -e "s/^pkgver=.\+$/pkgver=${pkgver}/" PKGBUILD | \ +sed -e "s/^md5sums=.\+$/md5sums=('${md5}')/" > PKGBUILD.tmp +mv PKGBUILD.tmp PKGBUILD +makepkg --printsrcinfo > .SRCINFO +echo "pkgver=${pkgver}" +echo "md5sums=('${md5}')" |