Further preparations for automatic package updates

Refs: #8
This commit is contained in:
Marcel Kapfer 2023-07-19 23:24:10 +02:00
parent fedd17ea8b
commit 76e7de6d53
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
3 changed files with 43 additions and 25 deletions

20
autoupdate.sh Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
dir="$(find . -maxdepth 1 -type d -name "intellij-idea-*")"
pushd "$dir" || exit 1
check="$(uscan --dehs --no-download)"
status="$(echo "$check" | xmllint --xpath 'string(/dehs/status)' -)"
if [[ "$status" != "newer package available" ]]; then
echo "No newer package available."
exit
fi
new_version="$(echo "$check" | xmllint --xpath 'string(/dehs/upstream-version)' -)"
popd
./update-new-version.sh --autoupdate "$new_version"