Skip to content

Commit

Permalink
docs: add examples section
Browse files Browse the repository at this point in the history
  • Loading branch information
devmatteini committed Aug 18, 2024
1 parent 6b6a106 commit 58c0929
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ make release
- [Install assets](#install-assets)
- [Private repositories & rate limit](#private-repositories--rate-limit)
- [Shell completion](#shell-completion)
- [Examples](#examples)

### Interactive download

Expand Down Expand Up @@ -187,6 +188,55 @@ dra --help
dra <command> --help
```

### Examples

Install an executable from a tar archive

```shell
dra download -s helloworld.tar.gz -i devmatteini/dra-tests
./helloworld
```

Install and move the executable to a custom directory

```shell
dra download -a -i -o ~/.local/bin/ devmatteini/dra-tests
~/.local/bin/helloworld
```

Install an executable file without an archive

```shell
dra download -s helloworld-unix -i devmatteini/dra-tests
./helloworld-unix
```

Install an executable from a compressed file

```shell
dra download -s helloworld-compressed-unix.bz2 -i devmatteini/dra-tests
./helloworld-compressed-unix
```

Install and rename the executable (useful when downloading an executable or compressed file)

```shell
dra download -s helloworld-unix -i -o helloworld devmatteini/dra-tests
./helloworld
```

Install a specific executable when many are available

```shell
# First download the main executable
dra download -s helloworld-many-executables-unix.tar.gz -I helloworld-v2 devmatteini/dra-tests
./helloworld-v2

# Then download another executable
dra download -s helloworld-many-executables-unix.tar.gz -I random-script devmatteini/dra-tests
./random-script
```

## Contributing

Take a look at the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
Expand Down

0 comments on commit 58c0929

Please sign in to comment.