diff options
author | Cem Keylan <cem@ckyln.com> | 2020-05-26 13:15:16 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-05-26 13:15:16 +0300 |
commit | 16278eed2f9304c5158875f535f96f0c369a190a (patch) | |
tree | fc34693f08205ce4ea91e531b97ea68bf399a112 /build | |
parent | 8f47b3220076639641b699f4e61b17b3bf1b93da (diff) | |
download | website-16278eed2f9304c5158875f535f96f0c369a190a.tar.gz |
update
Diffstat (limited to 'build')
-rwxr-xr-x | build | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -35,11 +35,11 @@ EOF } gettitle() { - sed 1q "$1" | grep -q '^Title:' || { - basename "$1" .md - return 0 - } - sed 's/^[Tt]itle: //;1q' "$1" + case "$(sed 1q "$1")" in + Title:*) sed 's/^[Tt]itle: //;1q' "$1" ;; + *) file=${1##*/} file=${file%.md} + printf '%s\n' "$file" + esac } genpages() { |