123456789101112131415161718192021 |
- #!/usr/bin/env bash
- set -euo pipefail # bash strict mode
- require_sudo() {
- if [[ $EUID -ne 0 ]]; then
- echo "Please run as superuser! Try running:"
- echo "sudo $0"
- exit 2
- fi
- }
- require_sudo
- url="https://freetubeapp.io/#download"
- download_link=$(curl "$url" | \grep -E 'amd64.*\.deb' | cut -d\" -f2)
- filename="/tmp/freetube.deb"
- wget -c "$download_link" -O "$filename"
- dpkg -i "$filename"
|