Created
January 22, 2019 17:10
-
-
Save sixtyfive/df9b6b7ea263678c6353d17a0b8e8aef to your computer and use it in GitHub Desktop.
Simple bash script to download the latest version of Signal Desktop
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 | |
# Public domain. Use and abuse and tell me if you make it prettier, | |
# like, add a "--prefix" option or figure out where to put .desktop | |
# files or link the binary to... | |
echo -n "Looking up latest version, " | |
verurl="https://github.com/signalapp/Signal-Desktop/releases" | |
pkgver=$(curl -s "${verurl}" | grep "/signalapp/Signal-Desktop/releases/tag/" -m 1 | grep -oP '[\d\.]*') | |
pkgdir="${HOME}/.local" | |
pkgfile="signal-desktop_${pkgver}_amd64.deb" | |
echo -n "downloading, " | |
wget -qc "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/${pkgfile}" | |
echo -n "unpacking, " | |
ar x "${pkgfile}" | |
tar xf data.tar.xz -C "${pkgdir}" | |
echo "done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment