little fix

This commit is contained in:
Luke Smith 2018-12-20 17:11:34 -05:00
parent 094b7c91c4
commit 1e5612f2c3
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
1 changed files with 1 additions and 1 deletions

2
lb
View File

@ -23,7 +23,7 @@ newpost() { read -erp "Give a title for your post:
" title
echo "$title" | grep "\"" >/dev/null && printf "Double quotation marks (\") are not allowed in entry titles.\\n" && exit
url="$(echo "$title" | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')"
echo "\\nAddDescription \"$title\" \"$url.html\"" >> "$webdir/blog/.htaccess" || { echo "Error: Is htaccess writeable?"; exit; }
printf "\\nAddDescription \"$title\" \"$url.html\"" >> "$webdir/blog/.htaccess" || { echo "Error: Is htaccess writeable?"; exit; }
[ -f "$webdir/blog/.drafts/$url.html" ] && echo "There is already an existing draft entry of that same name/URL." && exit
[ -f "$webdir/blog/$url.html" ] && echo "There is already an existing published entry of that same name/URL." && exit
$EDITOR "$webdir/blog/.drafts/$url.html" ;}