aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-26 13:15:16 +0300
committerCem Keylan <cem@ckyln.com>2020-05-26 13:15:16 +0300
commit16278eed2f9304c5158875f535f96f0c369a190a (patch)
treefc34693f08205ce4ea91e531b97ea68bf399a112 /build
parent8f47b3220076639641b699f4e61b17b3bf1b93da (diff)
downloadwebsite-16278eed2f9304c5158875f535f96f0c369a190a.tar.gz
update
Diffstat (limited to 'build')
-rwxr-xr-xbuild10
1 files changed, 5 insertions, 5 deletions
diff --git a/build b/build
index 72e4432..e1332f4 100755
--- a/build
+++ b/build
@@ -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() {