forked from catthehacker/virtual-environments-fork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-cli.sh
More file actions
17 lines (14 loc) · 742 Bytes
/
github-cli.sh
File metadata and controls
17 lines (14 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -e
################################################################################
## File: github-cli.sh
## Desc: Installs GitHub CLI
## Must be run as non-root user after homebrew
################################################################################
# Source the helpers for use with the script
# shellcheck source=/images/linux/scripts/helpers/install.sh
source "$HELPER_SCRIPTS"/install.sh
# Install GitHub CLI
url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.assets[].browser_download_url|select(contains("linux") and contains("amd64") and contains(".deb"))')
download_with_retries $url "/tmp"
apt install /tmp/gh_*_linux_amd64.deb
invoke_tests "CLI.Tools" "GitHub CLI"