diff options
author | Toby Vincent <tobyv13@gmail.com> | 2021-05-20 16:40:55 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2021-05-20 16:40:55 -0500 |
commit | cbe88adb2c1478df823bcfc7dbb62730d6c8e040 (patch) | |
tree | f3b6ca36ce1a63b3b72d0feaeed9ecf2d928599d /gitconfig | |
parent | 6a721af96b493244d5852bfa698ac8a987f9237c (diff) |
fix: fixed license to remove python dep
Diffstat (limited to 'gitconfig')
-rw-r--r-- | gitconfig | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -61,7 +61,7 @@ smrm = "!f(){ git rm --cached \"$1\";rm -r \"$1\";git config -f .gitmodules --re # generate git artifacts ignore = "!f() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; f" attributes = "!f() { curl -sL https://gist.githubusercontent.com/tobyvin/70f3671c76016063594ea45edbb97094/raw ;}; f" -license = "!f() { curl -sH 'Accept: application/vnd.github.v3+json' https://api.github.com/licenses/$1 | (python2 -c \"import sys, json; print json.load(sys.stdin)['body'];\" | sed \"s/\\[year\\]/$(date +'%Y')/\" | sed \"s/\\[fullname\\]/$(git config --get user.name)/\"); }; f" +license = "!f() { curl -sH 'Accept: application/vnd.github.v3+json' https://api.github.com/licenses/$1 | grep -oP '.*\"body\":\\s*\"\\K.*(?=\\s*\",)' | tr '\\n' '\\0' | xargs -0 printf '%b\\n' | sed \"s/\\[year\\]/$(date +'%Y')/\" | sed \"s/\\[fullname\\]/$(git config --get user.name)/\"; }; f" # create and keep an empty directory at the provided path keep = "!f() { ([ -f $@/.gitkeep ] || (mkdir -p $@ && curl -sL https://api.ef.gy/fortune > $@/.gitkeep)) && (grep -qsxF '!/**/.gitkeep' .gitignore || echo '!/**/.gitkeep' >> .gitignore) ;}; f" |