diff options
author | p4bl0 <pablo@rauzy.name> | 2010-07-24 13:51:43 +0200 |
---|---|---|
committer | p4bl0 <pablo@rauzy.name> | 2010-07-24 13:51:43 +0200 |
commit | 4d5ea7173008872a5309b35157a4883676ff689b (patch) | |
tree | 11024c01d55b8c32cbe579d7ab59849998712432 | |
parent | 5ff0da0a719dd5e151004e41a5c18fbc7efb814a (diff) |
the preproc should be a unix filter
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | post-commit.sh | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -71,8 +71,8 @@ fugitive README file </p> <p> If you want your article to be preprocessed by an external tool (markdown, - textile...) you need to set <em>preproc</em> to a command line that will take - the file path as argument and write to stdout. + textile...) you need to set <em>preproc</em> to a command line that will read + on stdin and write to stdout. </p> <h2>Usage</h2> diff --git a/post-commit.sh b/post-commit.sh index 30d9315..0dc75c9 100644 --- a/post-commit.sh +++ b/post-commit.sh @@ -197,7 +197,7 @@ for f in $added_files $new $modified_files; do if [ "$preproc" != "" ]; then preproc_bak=`tempfile -p "fugitive" -d "$articles_dir"` mv "$f" "$preproc_bak" - $preproc "$preproc_bak" > "$f" + ($preproc) < "$preproc_bak" > "$f" fi art="${f#$articles_dir/}" echo -n "[fugitive] Generating $public_dir/$art.html from $f... " |