File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22#
3- # Initial the categories/tags pages and for posts.
3+ # Initial the Categories/Tags pages and Lastmod for posts.
44# © 2019 Cotes Chung
55# Published under MIT License
66
1919
2020python _scripts/py/init_all.py
2121
22+ find . | grep -E " (__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
23+
2224msg=" Updated"
2325
2426if [[ ! -z $( git status categories -s) ]]; then
2527 git add categories/
26- msg+=" Categories' pages "
28+ msg+=" the Categories "
2729 CATEGORIES=true
2830fi
2931
3032
3133if [[ ! -z $( git status tags -s) ]]; then
3234 git add tags/
3335 if [[ $CATEGORIES = true ]]; then
34- msg+=" and"
36+ msg+=" ,"
37+ else
38+ msg+=" the"
3539 fi
36- msg+=" Tags' pages "
40+ msg+=" Tags"
3741 TAGS=true
3842fi
3943
4044if [[ ! -z $( git status _posts -s) ]]; then
4145 git add _posts/
4246 if [[ $CATEGORIES = true || $TAGS = true ]]; then
43- msg+=" and"
47+ msg+=" ,"
48+ else
49+ msg+=" the"
4450 fi
4551 msg+=" Lastmod"
4652 LASTMOD=true
You can’t perform that action at this time.
0 commit comments