Last active
August 11, 2017 21:26
-
-
Save ivanpu/4e687de3fcb5cc28e6c3 to your computer and use it in GitHub Desktop.
RuneScape repo update checker
This file contains 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 | |
# Note: the following key must be added beforehand to your keyring: | |
# https://content.runescape.com/downloads/ubuntu/runescape.gpg.key | |
set -e | |
# settings - editable | |
dist=trusty | |
repo="https://content.runescape.com/downloads/ubuntu/dists/$dist" | |
pkgs="non-free/binary-amd64/Packages.gz" | |
echo $'\n\033[1m==> Downloading: Release\033[0m' | |
wget -O Release "$repo/Release" | |
wget -O Release.gpg "$repo/Release.gpg" | |
gpg --verify Release.gpg Release | |
echo $'\n\033[1m==> Downloading: Packages\033[0m' | |
wget -O Packages.gz "$repo/non-free/binary-amd64/Packages.gz" | |
grep $(sha256sum Packages.gz | sed 's/ .*//') Release | |
rm -f Packages | |
gunzip Packages.gz | |
grep $(sha256sum Packages | sed 's/ .*//') Release | |
echo $'\n\033[1m*** Latest packages ***\033[0m' | |
grep '^\(Package\|Version\|SHA256\):' Packages |
set -e stops running the script if it hits an error
How exactly does one add https://content.runescape.com/downloads/ubuntu/runescape.gpg.key to ones "keyring"?
download and run gpg --import runescape.gpg.key
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey! What does set -e do?