diff --git a/bb.sh b/bb.sh index 73c86b6..d5008d4 100755 --- a/bb.sh +++ b/bb.sh @@ -891,7 +891,7 @@ make_gophermap() { EOF chmod +x "${HOME}/public_html/blog/${gophermap}" fi - chmod 644 ./*.md + chmod 644 "./*.md" } make_gemini() { @@ -1111,9 +1111,11 @@ 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" && \ - mkdir -p "$HOME/public_html/blog" && cd "$HOME/public_html/blog" || exit 1 + if [ "$(pwd)" != "$HOME/public_html/blog" ]; then + echo "you're not in your blog directory. moving you there now" + mkdir -p "$HOME/public_html/blog" + cd "$HOME/public_html/blog" || exit 1 + fi # Detect if using BSD date or GNU date date_version_detect