diff options
author | p4bl0 <pablo@rauzy.name> | 2010-07-26 11:46:21 +0200 |
---|---|---|
committer | p4bl0 <pablo@rauzy.name> | 2010-07-26 11:46:21 +0200 |
commit | 99892ef242b341e64d1d4645ee3174cc78f3ca39 (patch) | |
tree | ab9410cc9ddfc838d3fbfb0faaa86eb809303a7a /post-commit.sh | |
parent | b719800bb92e94617de98b78416a7a64d32ed9de (diff) |
putting lines specific to post-commit at the top of the file so the rest could be shared with post-receive
Diffstat (limited to 'post-commit.sh')
-rw-r--r-- | post-commit.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/post-commit.sh b/post-commit.sh index 0985a3d..3cfa89a 100644 --- a/post-commit.sh +++ b/post-commit.sh @@ -1,5 +1,12 @@ #!/bin/sh +added_files=`git log -1 --name-status --pretty="format:" | grep -E '^A' | \ + cut -f2` +modified_files=`git log -1 --name-status --pretty="format:" | grep -E '^M' | \ + cut -f2` +deleted_files=`git log -1 --name-status --pretty="format:" | grep -E '^D' | \ + cut -f2` + blog_url=`git config --get fugitive.blog-url` public_dir=`git config --get fugitive.public-dir` if [ ! -d "$public_dir" ]; then mkdir -p "$public_dir"; fi @@ -7,12 +14,6 @@ templates_dir=`git config --get fugitive.templates-dir` articles_dir=`git config --get fugitive.articles-dir` preproc=`git config --get fugitive.preproc` -added_files=`git log -1 --name-status --pretty="format:" | grep -E '^A' | \ - cut -f2` -modified_files=`git log -1 --name-status --pretty="format:" | grep -E '^M' | \ - cut -f2` -deleted_files=`git log -1 --name-status --pretty="format:" | grep -E '^D' | \ - cut -f2` generated_files=`tempfile -p "fugitive"` articles_sorted=`tempfile -p "fugitive"` |