-
-
Save Fred-Barclay/d2502504a827a5097cbde7aa41faadb2 to your computer and use it in GitHub Desktop.
atom-beta-update.sh: download & install in openSUSE the latest Beta version of Atom from GitHub
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/sh | |
# atom-beta-update.sh: download & install in openSUSE the latest Beta version | |
# of Atom from GitHub: https://atom.io/beta | |
# Copyright © 2016 Antonio Hernández Blas <[email protected]> | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
TMP_DIR="/root/.atom-releases" | |
github_server="https://github.com" | |
github_releases="https://github.com/atom/atom/releases" | |
last_release="$(wget -o /dev/null -O - ${github_releases} | \ | |
grep -E '.*releases.*download.*beta.*x86_64.rpm.*' | \ | |
sed 's/^.*ref="//' | \ | |
sed 's/x86_64.rpm.*$/x86_64.rpm/' | \ | |
grep -E 'atom.x86_64.rpm$' | \ | |
head -1 )" | |
mkdir -p $TMP_DIR | |
cd $TMP_DIR | |
chown -R root:root . | |
rm -f atom.x86_64.rpm wget.log | |
echo | |
echo " => Downloading ${github_server}/${last_release}" | |
echo | |
sleep 3 | |
wget "${github_server}/${last_release}" -O atom.x86_64.rpm -o - | tee wget.log | |
echo | |
echo " => Installing atom.x86_64.rpm" | |
echo | |
zypper install atom.x86_64.rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment