2016-08-02 22:25:05 +02:00
|
|
|
#!/bin/bash
|
2017-12-02 19:38:02 +01:00
|
|
|
set -e
|
2016-08-02 22:25:05 +02:00
|
|
|
|
|
|
|
# This script downloads the given release from GitHub so we can mirror it on
|
|
|
|
# qutebrowser.org.
|
|
|
|
|
|
|
|
tmpdir=$(mktemp -d)
|
|
|
|
oldpwd=$PWD
|
|
|
|
|
|
|
|
if [[ $# != 1 ]]; then
|
|
|
|
echo "Usage: $0 <version>" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-12-02 19:38:02 +01:00
|
|
|
cd "$tmpdir"
|
2016-08-02 22:25:05 +02:00
|
|
|
mkdir windows
|
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
base="https://github.com/qutebrowser/qutebrowser/releases/download/v$1"
|
2016-08-02 22:25:05 +02:00
|
|
|
|
2017-12-02 19:38:02 +01:00
|
|
|
wget "$base/qutebrowser-$1.tar.gz"
|
|
|
|
wget "$base/qutebrowser-$1.tar.gz.asc"
|
|
|
|
wget "$base/qutebrowser-$1.dmg"
|
|
|
|
wget "$base/qutebrowser_${1}-1_all.deb"
|
2016-08-02 22:25:05 +02:00
|
|
|
|
2017-12-02 19:38:02 +01:00
|
|
|
cd windows
|
|
|
|
wget "$base/qutebrowser-${1}-amd64.msi"
|
|
|
|
wget "$base/qutebrowser-${1}-win32.msi"
|
|
|
|
wget "$base/qutebrowser-${1}-windows-standalone-amd64.zip"
|
|
|
|
wget "$base/qutebrowser-${1}-windows-standalone-win32.zip"
|
2016-08-02 22:25:05 +02:00
|
|
|
|
|
|
|
dest="/srv/http/qutebrowser/releases/v$1"
|
2017-12-02 19:38:02 +01:00
|
|
|
cd "$oldpwd"
|
2016-08-02 22:25:05 +02:00
|
|
|
sudo mv "$tmpdir" "$dest"
|
|
|
|
sudo chown -R http:http "$dest"
|