diff options
author | tv <tv@shackspace.de> | 2014-07-15 13:03:07 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-07-15 13:03:07 +0200 |
commit | d4d6241b6b1e948bbc52fc8dab22f098d6130af6 (patch) | |
tree | a7e32b3b856708073ced714533d7c9d8ea86faad | |
parent | 34cc17478481ff8b82343b37ef890a929ed1f8a9 (diff) |
Reaktor nag: git_pull_output_filter REPO_NAME
-rwxr-xr-x | Reaktor/commands/nag | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Reaktor/commands/nag b/Reaktor/commands/nag index 338c083e..24414dd3 100755 --- a/Reaktor/commands/nag +++ b/Reaktor/commands/nag @@ -9,21 +9,22 @@ fi trap 'rm -f nag.hosts.ls nag.services.ls nag.patch' EXIT INT QUIT +# usage: git_pull_output_filter REPO_NAME git_pull_output_filter() { - sed -n '/^ [0-9]\+ file change/p' + sed -n 's/^ [0-9]\+ file change/'"$1"': &/p' } if ! test -d nag.hosts; then git clone "$hosts_repo" nag.hosts else - (cd nag.hosts && git pull) | git_pull_output_filter + (cd nag.hosts && git pull) | git_pull_output_filter hosts fi if ! test -d nag.services; then git clone "$services_repo" nag.services else - (cd nag.services && git pull) | git_pull_output_filter + (cd nag.services && git pull) | git_pull_output_filter services fi |