From 7ce24d937c207e96b515cfe87a29059dfaafee5a Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 23 Mar 2024 20:20:49 +0100 Subject: [PATCH] Fix publishing not working. --- home-manager/modules/scripts/blog/blog | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/home-manager/modules/scripts/blog/blog b/home-manager/modules/scripts/blog/blog index d474831..9ebf912 100755 --- a/home-manager/modules/scripts/blog/blog +++ b/home-manager/modules/scripts/blog/blog @@ -36,16 +36,15 @@ remove_file() { fi } -if [ $# -ne 2 ]; then +if [ "$1" = "pub" ]; then + publish + exit 0 +elif [ $# -ne 2 ]; then echo "You need to provide action and file name." exit 1 fi case "$1" in -pub) - publish "$2" - exit 0 - ;; edit) open_file "$2" exit 0