Skip to content

Commit bc80d03

Browse files
committed
Fix gh installation on linux
1 parent 0a2fde1 commit bc80d03

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

linux

+8-7
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,20 @@ 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 ..."
181+
fancy_echo "Installing GitHub CLI client ..."
182182
version="$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)"
183183

184-
if uname -m | grep -Fq "x86_64"; then
185-
arch="amd64"
184+
if uname -m | grep -Fq 'x86_64'; then
185+
arch='amd64'
186186
else
187-
arch="i386"
187+
arch='i386'
188188
fi
189189

190+
cd /tmp
190191
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
192+
curl "$url" -sLo gh.deb
193+
sudo dpkg -i gh.deb
194+
cd -
194195
### end linux-components/github
195196

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

linux-components/github

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
# fancy_echo "Installing GitHub CLI client ..."
1+
fancy_echo "Installing GitHub CLI client ..."
22
version="$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)"
33

4-
if uname -m | grep -Fq "x86_64"; then
5-
arch="amd64"
4+
if uname -m | grep -Fq 'x86_64'; then
5+
arch='amd64'
66
else
7-
arch="i386"
7+
arch='i386'
88
fi
99

10+
cd /tmp
1011
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
12+
curl "$url" -sLo gh.deb
13+
sudo dpkg -i gh.deb
14+
cd -

0 commit comments

Comments
 (0)