Last active
April 17, 2020 17:47
-
-
Save trmaphi/317ca78158b93b951e80fa7e39c5f0f2 to your computer and use it in GitHub Desktop.
Kitematic install script for Ubuntu
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
#!/usr/bin/env bash | |
set -v -e | |
BASEDIR=$(dirname "$0") | |
echo "$BASEDIR" | |
# Get link for latest release .deb package | |
URL=$(curl -s "https://api.github.com/repos/docker/kitematic/releases/latest" | grep browser_download_url | grep Ubuntu | cut -d '"' -f 4) | |
ZIPFILE=$(basename "${URL}") | |
curl --fail -LO "$URL" --output "${BASEDIR}/${ZIPFILE}" | |
# Version and package name | |
VERSION=${ZIPFILE%"Ubuntu.zip"} | |
PACKNAME=$(echo "${VERSION//-/_}")amd64.deb | |
#unzip and remove zip file | |
unzip "$ZIPFILE" && rm "$ZIPFILE" | |
#install and remove | |
cd dist && sudo dpkg -i "$PACKNAME" && cd .. && rm -rf dist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! Saw this on reddit, this got me started, but i ran into a few issues (no dist directory, a few other errors (like the name didn't match the file, and i'm not a fan of all the cd'ing around)
here's what i ended up w/