Skip to content

Commit

Permalink
Fixes #9 by fixing the install.sh script and updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
Zef Hemel committed Oct 2, 2017
1 parent bfcc884 commit 3a9a811
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,28 @@ Ax features:
* Various output format (pretty text, JSON, pretty JSON, YAML) that can be used for further processing
* Command completion for all commands and flags (e.g. completing attribute names)

## Installation/Upgrades
## Installation
Ax can be installed in two ways:

1. through downloading pre-compiled binaries (for official releases)
2. through fetching the latest version from Github and compiling using the Go tools

### Pre-compiled binaries
On Linux or Mac (this will attempt to install the binary into `/usr/local/bin` by default):

curl -sfL https://raw.githubusercontent.com/egnyte/ax/master/install.sh | sh

If you want to install the `ax` binary into another location, simply set the `BINDIR` environment variable, e.g.:

curl -sfL https://raw.githubusercontent.com/egnyte/ax/master/install.sh | BINDIR=. sh

to install in the current directory.

If you don't trust piping random shell scripts from the internet into a shell, feel free to download the `install.sh` script first, inspect it, then run it through bash manually or, simply go through the [Ax releases](https://github.com/egnyte/ax/releases) page and download the tarball of your choice.

Upgrades can be installed by simply re-running the above command.

### Bleeding edge with Go-tools
For now there's no pre-built binaries, so to run this you need a reasonably recent version of Go, then download it into your GOPATH:

go get -u github.com/egnyte/ax/...
Expand Down
5 changes: 1 addition & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ EOF
}

parse_args() {
#BINDIR is ./bin unless set be ENV
# over-ridden by flag below

BINDIR=${BINDIR:-./bin}
BINDIR=${BINDIR:-/usr/local/bin}
while getopts "b:h?" arg; do
case "$arg" in
b) BINDIR="$OPTARG" ;;
Expand Down

0 comments on commit 3a9a811

Please sign in to comment.