From d62085770a1739df913b4a6b218d9c8dcd84f66b Mon Sep 17 00:00:00 2001 From: rany Date: Tue, 1 Sep 2020 01:16:21 +0000 Subject: [PATCH] Bug Fix if `~/public_html/blog` doesn't exist then the script never moves to it and creates all html/blog files in current pwd --- bb.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bb.sh b/bb.sh index f4b58d1..0afc866 100755 --- a/bb.sh +++ b/bb.sh @@ -1093,8 +1093,8 @@ date_version_detect() { # $2 file name of a draft to continue editing (optional) do_main() { # make sure we're in the right directory - [ $(pwd) != $HOME/public_html/blog ] && - echo "you're not in your blog directory. moving you there now" && cd $HOME/public_html/blog + [ $(pwd) != $HOME/public_html/blog ] && + echo "you're not in your blog directory. moving you there now" && mkdir -p $HOME/public_html/blog && cd $HOME/public_html/blog # Detect if using BSD date or GNU date date_version_detect