big important fix of extreme brainlethood
This commit is contained in:
parent
fa10ce7a17
commit
094b7c91c4
2
lb
2
lb
|
@ -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 "AddDescription \"$title\" \"$url.html\"" >> "$webdir/blog/.htaccess" || { echo "Error: Is htaccess writeable?"; exit; }
|
||||
echo "\\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" ;}
|
||||
|
|
Loading…
Reference in New Issue