diff options
author | Carlos Fenollosa <carlos.fenollosa@gmail.com> | 2016-04-25 21:14:24 +0200 |
---|---|---|
committer | Carlos Fenollosa <carlos.fenollosa@gmail.com> | 2016-04-25 21:14:24 +0200 |
commit | 09fa5532332dad897f93fda1125cc7f9e2e6e411 (patch) | |
tree | d852a2f0d1ce8845399cc51a2a25033e88805112 | |
parent | dd3c8a4a11d886d5b440289c138e30cadf8dc1f2 (diff) |
avoid the user mistakingly using 'edit <draft>' instead of 'post <draft>'
-rwxr-xr-x | bb.sh | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -266,6 +266,7 @@ get_html_file_content() { # leave empty for default behavior (edit only text part and change name) edit() { # Original post timestamp + [[ ! -f "${1%%.*}.html" ]] && echo "Can't edit post "${1%%.*}.html", did you mean to use \"bb.sh post <draft_file>\"?" && exit -1 edit_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"%a, %d %b %Y %H:%M:%S %z" ) touch_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +'%Y%m%d%H%M') tags_before=$(tags_in_post "${1%%.*}.html") |