-
Notifications
You must be signed in to change notification settings - Fork 4
/
pre-commit.bak
19 lines (12 loc) · 1.19 KB
/
pre-commit.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
commit_hash=$(git rev-parse HEAD)
small_commit_hash=${commit_hash:0:7}
commit_url="https://github.com/Draggie306/CheatSheets/commit/$commit_hash"
sed -i "s|Last commit: [^<]*</p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|Last commit: <a href=\"$commit_url\">$small_commit_hash</a></p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|g" "A level/index.html"
git add "A level/index.html"
sed -i "s|Last commit: [^<]*</p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|Last commit: <a href=\"$commit_url\">$small_commit_hash</a></p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|g" "GCSE/index.html"
git add "GCSE/index.html"
sed -i "s|Last commit: [^<]*</p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|Last commit: <a href=\"$commit_url\">$small_commit_hash</a></p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|g" index.html
git add index.html
sed -i "s|Last commit: [^<]*</p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|Last commit: <a href=\"$commit_url\">$small_commit_hash</a></p><br><br><br><br><br><br><br> <!-- extra space for mobile -->|g" cheatsheet-master.js
git add cheatsheet-master.js