Skip to content

Commit 6f392bb

Browse files
author
Dan Croak
committed
Switch from hub to gh
[gh] is a [hub] reimplementation that's much faster and is now the official Github CLI. It appears that "hub" is [deprecated]. [gh]: https://github.com/jingweno/gh [hub]: https://github.com/github/hub [deprecated]: mislav/hub#475
1 parent 7e7cdcf commit 6f392bb

File tree

5 files changed

+30
-10
lines changed

5 files changed

+30
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ What it sets up
5555
* [Bundler] for managing Ruby libraries
5656
* [Exuberant Ctags] for indexing files for vim tab completion
5757
* [Foreman] for serving Rails apps locally
58+
* [gh] for interacting with the GitHub API
5859
* [Heroku Config] for local `ENV` variables
5960
* [Heroku Toolbelt] for interacting with the Heroku API
60-
* [Hub] for interacting with the GitHub API
6161
* [Homebrew] for managing operating system libraries (OS X only)
6262
* [ImageMagick] for cropping and resizing images
6363
* [Node.js] and [NPM], for running apps and installing JavaScript packages
@@ -78,9 +78,9 @@ What it sets up
7878
[Bundler]: http://bundler.io/
7979
[Exuberant Ctags]: http://ctags.sourceforge.net/
8080
[Foreman]: https://github.com/ddollar/foreman
81+
[gh]: https://github.com/jingweno/gh
8182
[Heroku Config]: https://github.com/ddollar/heroku-config
8283
[Heroku Toolbelt]: https://toolbelt.heroku.com/
83-
[Hub]: https://hub.github.com/
8484
[Homebrew]: http://brew.sh/
8585
[ImageMagick]: http://www.imagemagick.org/
8686
[Node.js]: http://nodejs.org/

linux

+13-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,19 @@ fancy_echo "Installing the heroku-config plugin to pull config variables locally
178178
heroku plugins:install git://github.com/ddollar/heroku-config.git
179179
### end linux-components/heroku
180180

181-
fancy_echo "Installing GitHub CLI client ..."
182-
curl http://hub.github.com/standalone -sLo ~/.bin/hub
183-
chmod +x ~/.bin/hub
181+
# fancy_echo "Installing GitHub CLI client ..."
182+
version=$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)
183+
184+
if test "$(uname -m)" = "x86_64" ; then
185+
arch="amd64"
186+
else
187+
arch="i386"
188+
fi
189+
190+
url="https://github.com/jingweno/gh/releases/download/v${version}/gh_${version}_${arch}.deb"
191+
curl $url -sLo ~/.bin/gh.deb
192+
sudo dpkg -i ~/.bin/gh.deb
193+
chmod +x ~/.bin/gh
184194
### end linux-components/github
185195

186196
fancy_echo "Installing rcm, to manage your dotfiles ..."

linux-components/github

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
fancy_echo "Installing GitHub CLI client ..."
2-
curl http://hub.github.com/standalone -sLo ~/.bin/hub
3-
chmod +x ~/.bin/hub
1+
# fancy_echo "Installing GitHub CLI client ..."
2+
version=$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)
3+
4+
if test "$(uname -m)" = "x86_64" ; then
5+
arch="amd64"
6+
else
7+
arch="i386"
8+
fi
9+
10+
url="https://github.com/jingweno/gh/releases/download/v${version}/gh_${version}_${arch}.deb"
11+
curl $url -sLo ~/.bin/gh.deb
12+
sudo dpkg -i ~/.bin/gh.deb
13+
chmod +x ~/.bin/gh

mac

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ fancy_echo "Installing foreman ..."
221221
### end mac-components/heroku
222222

223223
fancy_echo "Installing GitHub CLI client ..."
224-
brew_install_or_upgrade 'hub'
224+
brew_install_or_upgrade 'gh'
225225
### end mac-components/github
226226

227227
if ! command -v rcup &>/dev/null; then

mac-components/github

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
fancy_echo "Installing GitHub CLI client ..."
2-
brew_install_or_upgrade 'hub'
2+
brew_install_or_upgrade 'gh'

0 commit comments

Comments
 (0)