Summary: Make prepare-commit-msg hook more compatible with operating systems

Detail: Was using sed -i, which breaks on Mac

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360170672 -0700
This commit is contained in:
Marcus Sorensen 2013-02-06 10:11:12 -07:00
parent b28f3addfc
commit dc7578c72c
1 changed files with 10 additions and 12 deletions

View File

@ -54,8 +54,18 @@
run_generic_commit () {
local file=$1
SOB=$(git var GIT_AUTHOR_IDENT)
cat <<EOF > $file
################################# 80 chars #####################################
Summary:
Detail:
BUG-ID:
Bugfix-for:
Reviewed-by:
Reported-by:
Signed-off-by: ${SOB}
################################# 80 chars #####################################
# The following is an example of how to fill out the above form. Please limit
# your formatting to 80 cols.
#
@ -71,18 +81,6 @@ cat <<EOF > $file
#
$ORIGINAL
EOF
SOB=$(git var GIT_AUTHOR_IDENT)
sed -i "1s/^/################################# 80 chars #####################################\n\
Summary: \n\n\
Detail: \n\n\
BUG-ID: \n\
Bugfix-for: \n\
Reviewed-by: \n\
Reported-by: \n\
Signed-off-by: ${SOB}\n\n/" $file
}
case "$2,$3" in