coinbin/.git-hooks-post-checkout
2022-05-25 16:19:10 +09:00

6 lines
231 B
Bash

#!/bin/bash
commit=$(git cat-file commit HEAD) #
sha1=($((printf "commit %s\0" $(echo "$commit" | wc -c); echo "$commit") | sha1sum))
commit="var git_commit = '${sha1}';"
sed -i "s/.*var git_commit =.*/${commit}/" js/git-commit.js