mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2025-01-03 10:22:11 +01:00
Make the file executable
This commit is contained in:
parent
f4fe5cae94
commit
8bfa382d3c
1 changed files with 4 additions and 1 deletions
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
git config --global init.templatedir '~/.git-templates'
|
git config --global init.templatedir '~/.git-templates'
|
||||||
mkdir -p ~/.git-templates/hooks
|
mkdir -p ~/.git-templates/hooks
|
||||||
|
post_commit_path="~/.git-templates/hooks/post-commit"
|
||||||
|
|
||||||
cat << EOF > ~/.git-templates/hooks/post-commit
|
cat << EOF > $post_commit_path
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copy last commit hash to clipboard on commit
|
# Copy last commit hash to clipboard on commit
|
||||||
|
@ -13,3 +14,5 @@ commit_date=`git log -1 --format=%cd`
|
||||||
commit_data="\"{ \"date\": \"$commit_date\", \"url\": \"$repo_url\", \"hash\": \"$commit_hash\" }\""
|
commit_data="\"{ \"date\": \"$commit_date\", \"url\": \"$repo_url\", \"hash\": \"$commit_hash\" }\""
|
||||||
git-stats --record "$commit_data"
|
git-stats --record "$commit_data"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
chmod +x $post_commit_path
|
||||||
|
|
Loading…
Reference in a new issue