Skip to content

Instantly share code, notes, and snippets.

@zyedidia
Last active October 23, 2017 07:50
Show Gist options
  • Select an option

  • Save zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24 to your computer and use it in GitHub Desktop.

Select an option

Save zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
OS=$1
INSTALLDIR=${2:-"."}
function githubLatestTag {
finalUrl=`curl https://github.com/$1/releases/latest -s -L -I -o /dev/null -w '%{url_effective}'`
echo "${finalUrl##*v}"
}
TAG=`githubLatestTag zyedidia/micro`
echo "Downloading https://github.com/zyedidia/micro/releases/download/v$TAG/micro-$TAG-"$OS".tar.gz"
curl -L "https://github.com/zyedidia/micro/releases/download/v$TAG/micro-$TAG-"$OS".tar.gz" > micro.tar.gz
tar -xvf micro.tar.gz "micro-$TAG/micro"
rm micro.tar.gz
echo "mv micro-$TAG/micro $INSTALLDIR/micro"
mv micro-$TAG/micro $INSTALLDIR/micro
rm -rf micro-$TAG
@oct2pus
Copy link

oct2pus commented Oct 23, 2017

Repeating what the last two said, I get the same error.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gzip2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment