Created
January 2, 2018 00:35
-
-
Save bkcsoft/7f4a46d1b2e9933672475b0ad59dbaf9 to your computer and use it in GitHub Desktop.
Template Patcher for try.gitea.io
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
#!/usr/bin/env bash | |
function die() { | |
echo -n $@ 1>&2 | |
exit 1 | |
} | |
cd $(docker volume inspect -f '{{ .Mountpoint }}' demo_gitea)/templates/base/ | |
wget -o head.tmpl.master https://raw.githubusercontent.com/go-gitea/gitea/master/templates/base/head.tmpl || die "fetch failed" | |
# patch .master => .new, crash if failure | |
patch -uR -o head.tmpl.new head.tmpl.master head.tmpl.patch || die "patch failed" | |
# insert new template, remove partials | |
mv head.tmpl.new head.tmpl | |
rm head.tmpl.master | |
systemctl restart demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment