Last active
December 31, 2023 18:18
-
-
Save nedix/b5d868044205642376085ccf51be0b76 to your computer and use it in GitHub Desktop.
Aptitude firefox snapshot install
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
#!/usr/bin/env sh | |
FIREFOX_VERSION=117.0.1-1 | |
test -n "$ARCHITECTURE" || case $(uname -m) in \ | |
amd64|x86_64) ARCHITECTURE=amd64; ;; \ | |
arm64|aarch64|armv8b|armv8l) ARCHITECTURE=arm64; ;; \ | |
*) echo "Unsupported architecture, exiting..."; exit 1; ;; \ | |
esac \ | |
&& echo "deb http://deb.debian.org/debian stable main" > /etc/apt/sources.list \ | |
&& echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list \ | |
&& apt update \ | |
&& apt install -t stable -y $BUILD_DEPS \ | |
&& FIREFOX_INFO=$(curl -s "https://snapshot.debian.org/mr/binary/firefox/${FIREFOX_VERSION}/binfiles?fileinfo=1" \ | |
| jq -r '.fileinfo as $fileinfo | .result[] | select(.architecture == "'"$ARCHITECTURE"'") | .hash as $hash | $fileinfo[$hash][0] | $hash + " " + .name') \ | |
&& FIREFOX_HASH="${FIREFOX_INFO%% *}" \ | |
&& FIREFOX_FILE="${FIREFOX_INFO#* }" \ | |
&& curl -sSL "https://snapshot.debian.org/file/${FIREFOX_HASH}" -o "$FIREFOX_FILE" \ | |
&& apt install -y "./${FIREFOX_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment