Last active
March 23, 2021 11:12
-
-
Save amancevice/ea20cb5388b1a3aaf6e4fd984e78b63f to your computer and use it in GitHub Desktop.
A git hook for mining Amulets https://text.bargains/amulet/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# .git/hooks/commit-msg | |
chksum="$( printf "%s" "$(< $1)" | sha256sum )" | |
amulet="\e[5;1;48mYOU HAVE FOUND %s AMULET\e[0m\n" | |
if grep 8888888888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "AN IMPOSSIBLE" | |
elif grep 888888888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "A MYTHIC" | |
elif grep 88888888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "A LEGENDARY" | |
elif grep 8888888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "AN EPIC" | |
elif grep 888888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "A RARE" | |
elif grep 88888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "AN UNCOMMON" | |
elif grep 8888 > /dev/null <<< $chksum ; then | |
printf "$amulet" "A COMMON" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment