diff --git a/linux b/linux index e310b15ef..f76b2b72e 100644 --- a/linux +++ b/linux @@ -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 ..." diff --git a/linux-components/github b/linux-components/github index 6f82af67b..55d8fe86c 100644 --- a/linux-components/github +++ b/linux-components/github @@ -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 -