Created
December 17, 2020 22:33
-
-
Save asdkant/ca5156dee37dfd393510df4ee47ae8da to your computer and use it in GitHub Desktop.
script to check if factorio-experimental is up to date in Arch (or manjaro or similar)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=factorio-experimental" > PKGBUILD | |
INSTALLEDVER=`pacman -Qi factorio-experimental | grep Version | egrep -o '[0-9]\.[0-9]\.[0-9]'` | |
MAKEVER=`egrep '^pkgver\=[0-9]\\.[0-9]\\.[0-9]' PKGBUILD | egrep -o '[0-9]\.[0-9]\.[0-9]'` | |
if [[ $INSTALLEDVER == $MAKEVER ]]; then | |
echo "ππππππππππππππππ" | |
echo "π Factorio is up to date =) π" | |
echo "ππππππππππππππππ" | |
else | |
echo "Installed Version: $INSTALLEDVER" | |
echo "Package Version: $MAKEVER" | |
echo "Updating Factorio..." | |
makepkg -i | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment