Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Feb 9, 2016
1 parent 6e619cc commit 26b20f4
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,31 @@ on [caarlos0/shell-ci-build](https://github.com/caarlos0/shell-ci-build).

## How to

### Check your scripts

```console
# build the image:
$ docker build -t shellcheck .
$ docker run \
-v /folder/with/my/scripts:/tmp \
-t caarlos0/shellcheck \
sh -c 'shellcheck /tmp/*.sh'
```

### Copy the binary to outside

# run it locally against your scripts:
$ docker run -v /folder/with/my/scripts:/tmp -t shellcheck sh -c 'shellcheck /tmp/*.sh'
So you can use in it any ubuntu machine, travis machines, for example,
as I do in [caarlos0/shell-ci-build](https://github.com/caarlos0/shell-ci-build).

# copy the binary to outside, so it can be used in any ubuntu machine:
$ docker run -v `pwd`:/tmp -t shellcheck cp -f /usr/bin/shellcheck /tmp/
```
$ docker run \
-v `pwd`:/tmp \
-t caarlos0/shellcheck \
cp -f /usr/bin/shellcheck /tmp/
```

### Build

Not really needed unless you change something, as this repo is an automated Docker hub build.

```console
$ docker build -t caarlos0/shellcheck .
```

0 comments on commit 26b20f4

Please sign in to comment.