Update Makefile
This commit is contained in:
@@ -305,9 +305,12 @@ trackchange:
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Fix links in www directory
|
||||
fix_links:
|
||||
@find ./www -type f \( -name "*.html" -o -name "robots.txt" -o -name "sitemap.xml" \) -exec sed -i.bak \
|
||||
-e "s/src\/branch\/$(branchname)\/blob/src\/branch/g" \ # fix git source for gitea
|
||||
-e "s/{{< var branch >}}/$(branchname)/g" \
|
||||
-e "s/{{< var branch >}}/$(branchname)/g" \
|
||||
-e "s/{{< var pubtype >}}/$(pubtype)/g" \
|
||||
@@ -320,6 +323,7 @@ fix_links:
|
||||
-e "s|$(reponame)/edit|$(reponame)/_edit|g" {} +
|
||||
@find ./www -type f -name "*.bak" -delete
|
||||
|
||||
|
||||
updvariable:
|
||||
@touch _variables.yml # 如果文件不存在则创建
|
||||
@grep -q '^reponame:' _variables.yml || echo "reponame: $(reponame)" >> _variables.yml
|
||||
|
||||
Reference in New Issue
Block a user