From 07b2a0a7b607731dca6b56160457dc502cb02216 Mon Sep 17 00:00:00 2001 From: Sylvain Viart Date: Wed, 27 Jun 2018 07:08:39 +0200 Subject: [PATCH] add example legacy --- PROGRESS.md | 8 ++------ TODO.md | 7 +++++-- examples/legacy_bash/sshdiff.sh | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100755 examples/legacy_bash/sshdiff.sh diff --git a/PROGRESS.md b/PROGRESS.md index a6c4937..5bdb86c 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -1,8 +1,6 @@ # current work in PROGRRESS -finish examples/ -examples without lib docopts.sh -test .travis.yml with 2 OSes +old style loop bash examples # next @@ -10,11 +8,9 @@ test .travis.yml with 2 OSes publish release and pre-build binaries -## CI -integration with automated tests - ## provide test on old environment docker? 32bist bash 3 + diff --git a/TODO.md b/TODO.md index 4f489c3..3aabc24 100644 --- a/TODO.md +++ b/TODO.md @@ -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 @@ -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? ``` @@ -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) diff --git a/examples/legacy_bash/sshdiff.sh b/examples/legacy_bash/sshdiff.sh new file mode 100755 index 0000000..3cc8c4f --- /dev/null +++ b/examples/legacy_bash/sshdiff.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Show file differences between 2 hosts. +# Usage: sshdiff.sh [-h] [-s] [] +# +# If not specified, defaults to 3. +# +# Use colordiff if available. +# +# Options: +# -h display this help and exit +# -s use sort instead of cat to show remote +# +# Examples: +# sshdiff.sh server1 hostname2 /etc/hostname + +PATH=../..:$PATH +source docopts.sh --auto "$@" + +docopt_print_ARGS + +