Skip to content

Commit

Permalink
Merge branch 'bananaumai-change-install-dest'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomorain committed Oct 16, 2018
2 parents 0f98453 + 0e16fe9 commit 950a73e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ If you're installing the new `circleci` CLI for the first time, run the followin
bash -c "$(curl -fSl https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh)"
```

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 `DEST` environment variable when invoking `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`:

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


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

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

# Run the script in a temporary directory that we know is empty.
SCRATCH=$(mktemp -d)
Expand All @@ -30,9 +30,9 @@ grep -i "$(uname)" tarball_urls.txt | xargs curl --retry 3 --fail --location --o

tar zxvf circleci.tgz --strip 1

echo "Installing to $DEST"
mv circleci "$DEST"
chmod +x "$DEST/circleci"
echo "Installing to $DESTDIR"
mv circleci "$DESTDIR"
chmod +x "$DESTDIR/circleci"

command -v circleci

Expand Down

0 comments on commit 950a73e

Please sign in to comment.