diff options
author | BloodyAltair | 2019-03-27 21:31:29 +0300 |
---|---|---|
committer | BloodyAltair | 2019-03-27 21:31:29 +0300 |
commit | 2738ef85f737d660eb76dbbbd6d2a09eec66985c (patch) | |
tree | a6f04105c118ba1693950214eea5ad9cb44fa2f0 /pkg_upgrader.sh | |
parent | 5d1d80f0a78bfb1b7442d1817d12b915a8027c0b (diff) | |
download | aur-2738ef85f737d660eb76dbbbd6d2a09eec66985c.tar.gz |
+ Update scripts
+ Version update fix
+ Version update
Diffstat (limited to 'pkg_upgrader.sh')
-rwxr-xr-x | pkg_upgrader.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg_upgrader.sh b/pkg_upgrader.sh new file mode 100755 index 000000000000..a2005f06e659 --- /dev/null +++ b/pkg_upgrader.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# ######################################################### +# You can use this script as +# cronjob (or something lika that) +# to automatically update the app. +# +# DON'T FORGET TO REPLACE `yay` to your favorite AUR helper +# ######################################################### + +RELEASE_TIMESTAMP=$(curl -sL https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/ | grep -A2 "firefox-$(cat PKGBUILD | grep -oP "^_version=\K(.*)" | awk '{print $1}').ru.linux-x86_64.tar.bz2\"" | tail -n1 | cut -f2 -d'>' | cut -f1 -d'<' | date +"%s" -f -) +LOCAL_TIMESTAMP=$(cat ~/.firefox-nightly-ru.release.timestamp || echo 0) + +if (("$RELEASE_TIMESTAMP" > "$LOCAL_TIMESTAMP")); then + yay -S firefox-nightly-ru --noconfirm && echo $RELEASE_TIMESTAMP > ~/.firefox-nightly-ru.release.timestamp +fi |