From 9082ef4742921bf8ba4e2650d1019b7610faf4f3 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Sat, 21 May 2022 09:59:11 +0200 Subject: [PATCH] fixpkg: mangohud --- packages/mangohud-wayland/built.conf | 2 -- packages/mangohud-x11/built.conf | 2 -- packages/mangohud/built.conf | 2 ++ scripts/auto-update.sh | 6 ++++++ 4 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 packages/mangohud-wayland/built.conf delete mode 100644 packages/mangohud-x11/built.conf create mode 100644 packages/mangohud/built.conf diff --git a/packages/mangohud-wayland/built.conf b/packages/mangohud-wayland/built.conf deleted file mode 100644 index e716e705..00000000 --- a/packages/mangohud-wayland/built.conf +++ /dev/null @@ -1,2 +0,0 @@ -AUR_NAME="mangohud-wayland" -AUR_UPDATED="1652717058" diff --git a/packages/mangohud-x11/built.conf b/packages/mangohud-x11/built.conf deleted file mode 100644 index 6322e6ad..00000000 --- a/packages/mangohud-x11/built.conf +++ /dev/null @@ -1,2 +0,0 @@ -AUR_NAME="mangohud-x11" -AUR_UPDATED="1652717034" diff --git a/packages/mangohud/built.conf b/packages/mangohud/built.conf new file mode 100644 index 00000000..14a461f1 --- /dev/null +++ b/packages/mangohud/built.conf @@ -0,0 +1,2 @@ +AUR_NAME="mangohud" +AUR_UPDATED="null" diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index a73b2f74..4d798251 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -29,6 +29,12 @@ update-package() { local latest_version="$(curl --location --silent "https://aur.archlinux.org/rpc/?v=5&type=info&arg=${AUR_NAME}" | jq -r '.results[0].Version')" local last_updated="$(curl --location --silent "https://aur.archlinux.org/rpc/?v=5&type=info&arg=${AUR_NAME}" | jq -r '.results[0].LastModified')" + if [[ -z "${last_updated}" || "${last_updated}" = "null" ]] + then + echo "[!] Failed to get latest version of ${pkgname}" + return 1 + fi + if [ "${version}" = "${last_updated}" ] then return 0