From 99892ef242b341e64d1d4645ee3174cc78f3ca39 Mon Sep 17 00:00:00 2001 From: p4bl0 Date: Mon, 26 Jul 2010 11:46:21 +0200 Subject: putting lines specific to post-commit at the top of the file so the rest could be shared with post-receive --- post-commit.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'post-commit.sh') 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"` -- cgit v1.2.3