Skip to content

Commit

Permalink
Fix gh installation on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Sep 23, 2014
1 parent 0a2fde1 commit bc80d03
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 8 additions & 7 deletions linux
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,20 @@ fancy_echo "Installing the heroku-config plugin to pull config variables locally
heroku plugins:install git://github.com/ddollar/heroku-config.git
### end linux-components/heroku

# fancy_echo "Installing GitHub CLI client ..."
fancy_echo "Installing GitHub CLI client ..."
version="$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)"

if uname -m | grep -Fq "x86_64"; then
arch="amd64"
if uname -m | grep -Fq 'x86_64'; then
arch='amd64'
else
arch="i386"
arch='i386'
fi

cd /tmp
url="https://github.com/jingweno/gh/releases/download/v${version}/gh_${version}_${arch}.deb"
curl "$url" -sLo ~/.bin/gh.deb
sudo dpkg -i ~/.bin/gh.deb
chmod +x ~/.bin/gh
curl "$url" -sLo gh.deb
sudo dpkg -i gh.deb
cd -
### end linux-components/github

fancy_echo "Installing rcm, to manage your dotfiles ..."
Expand Down
15 changes: 8 additions & 7 deletions linux-components/github
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# fancy_echo "Installing GitHub CLI client ..."
fancy_echo "Installing GitHub CLI client ..."
version="$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)"

if uname -m | grep -Fq "x86_64"; then
arch="amd64"
if uname -m | grep -Fq 'x86_64'; then
arch='amd64'
else
arch="i386"
arch='i386'
fi

cd /tmp
url="https://github.com/jingweno/gh/releases/download/v${version}/gh_${version}_${arch}.deb"
curl "$url" -sLo ~/.bin/gh.deb
sudo dpkg -i ~/.bin/gh.deb
chmod +x ~/.bin/gh
curl "$url" -sLo gh.deb
sudo dpkg -i gh.deb
cd -

0 comments on commit bc80d03

Please sign in to comment.