Skip to content

Commit

Permalink
Document the new URL
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomorain committed Oct 25, 2018
1 parent 073b0ec commit 1dca9bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ This project is the seed for CircleCI's new command-line application.
If you're installing the new `circleci` CLI for the first time, run the following command:

```
bash -c "$(curl -fSl https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh)"
curl -fLSs https://circle.ci/cli | bash
```

By default, the `circleci` app will be installed to the ``/usr/local/bin`` directory. If you do not have write permissions to `/usr/local/bin`, you may need to run the above command with `sudo`. Alternatively, you can install to an alternate location by defining the `DESTDIR` environment variable when invoking `bash`:

```
DESTDIR=/opt/bin bash -c "$(curl -fSl https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh)"
curl -fLSs https://circle.ci/cli | DESTDIR=/opt/bin bash
```


Expand Down
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
set -o errexit
set -o nounset

echo Installing CircleCI CLI

RELEASE_URL="https://api.github.com/repos/CircleCI-Public/circleci-cli/releases/latest"
DESTDIR="${DESTDIR:-/usr/local/bin}"

Expand All @@ -29,9 +31,9 @@ echo -n 'Downloading CircleCI '
grep tag_name formatted_release.json | sed -E "$STRIP_JSON_STRING"

grep browser_download_url formatted_release.json | sed -E "$STRIP_JSON_STRING" > tarball_urls.txt
grep -i "$(uname)" tarball_urls.txt | xargs curl --retry 3 --fail --location --output circleci.tgz
grep -i "$(uname)" tarball_urls.txt | xargs curl --silent --retry 3 --fail --location --output circleci.tgz

tar zxvf circleci.tgz --strip 1
tar zxf circleci.tgz --strip 1

echo "Installing to $DESTDIR"
mv circleci "$DESTDIR"
Expand Down

0 comments on commit 1dca9bc

Please sign in to comment.