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