From 09fa5532332dad897f93fda1125cc7f9e2e6e411 Mon Sep 17 00:00:00 2001 From: Carlos Fenollosa Date: Mon, 25 Apr 2016 21:14:24 +0200 Subject: [PATCH] avoid the user mistakingly using 'edit ' instead of 'post ' --- bb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bb.sh b/bb.sh index 2153ba9..de9d659 100755 --- a/bb.sh +++ b/bb.sh @@ -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 \"?" && 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")