Skip to content

Commit

Permalink
add example legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Viart committed Jun 27, 2018
1 parent 71d41a6 commit 07b2a0a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
8 changes: 2 additions & 6 deletions PROGRESS.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# current work in PROGRRESS

finish examples/
examples without lib docopts.sh
test .travis.yml with 2 OSes
old style loop bash examples

# next

## release and binary

publish release and pre-build binaries

## CI
integration with automated tests

## provide test on old environment

docker?
32bist
bash 3

7 changes: 5 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See [API_proposal.md](API_proposal.md)

## build and publish binary

reuse build.sh to build golang binary and pubilsh it as a new release too.
Reuse build.sh to build golang binary and pubilsh it as a new release too.

## generate bash completion from usage

Expand All @@ -22,7 +22,7 @@ docopts -h "$help" --generate-completion

## embed test routine (validation)?

may we cat interract with the caller to eval some validation…
May we can interract with the caller to eval some validation…
It is needed? Is it our goal?

```
Expand All @@ -38,3 +38,6 @@ if docopts test -- num:gt:1:--count file_exists:INFILE
## config file parse config to option format

À la nslcd… ?

* json merge
* toml merge (ini)
22 changes: 22 additions & 0 deletions examples/legacy_bash/sshdiff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
#
# Show file differences between 2 hosts.
# Usage: sshdiff.sh [-h] [-s] <host1> <host2> <file> [<lines_context>]
#
# If not specified, <lines_context> defaults to 3.
#
# Use colordiff if available.
#
# Options:
# -h display this help and exit
# -s use sort instead of cat to show remote <file>
#
# Examples:
# sshdiff.sh server1 hostname2 /etc/hostname

PATH=../..:$PATH
source docopts.sh --auto "$@"

docopt_print_ARGS


0 comments on commit 07b2a0a

Please sign in to comment.