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