Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
Add install / update script for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantas0s committed Jul 21, 2019
1 parent 84af91d commit 4ff48fd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions install/linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Courtesy of https://github.com/jesseduffield/lazydocker/blob/master/scripts/install_update_linux.sh

# map different architecture variations to the available binaries
ARCH=$(uname -m)
case $ARCH in
i386|i686) ARCH=x86 ;;
armv6*) ARCH=armv6 ;;
armv7*) ARCH=armv7 ;;
aarch64*) ARCH=arm64 ;;
esac

# prepare the download URL
GITHUB_LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/Phantas0s/devdash/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
GITHUB_FILE="devdash_${GITHUB_LATEST_VERSION//v/}_$(uname -s)_${ARCH}.tar.gz"
GITHUB_URL="https://github.com/Phantas0s/devdash/releases/download/${GITHUB_LATEST_VERSION}/${GITHUB_FILE}"
echo $GITHUB_URL

# install/update the local binary
curl -LO $GITHUB_URL
mv ${GITHUB_FILE} devdash.tar.gz
tar xzvf devdash.tar.gz devdash
sudo mv -f devdash /usr/local/bin/
rm devdash.tar.gz

0 comments on commit 4ff48fd

Please sign in to comment.