From f1f499e5014fc37287be29fe41922446391e7324 Mon Sep 17 00:00:00 2001 From: octospacc Date: Sat, 20 Jan 2024 17:51:03 +0100 Subject: [PATCH] : --- .gitignore | 1 + local.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2747b94..f87a41c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ package-json.lock _site node_modules _drafts +.CommitMessage.txt diff --git a/local.sh b/local.sh index b5c9ffb..4bb342f 100644 --- a/local.sh +++ b/local.sh @@ -2,10 +2,12 @@ cd "$( dirname "$( realpath "$0" )" )" [ "$1" = "update" ] && \ - git add . && git commit -m ": $2" && git push + Message="$( [ -n "$2" ] && echo "$2" || cat .CommitMessage.txt )" + git add . && git commit -m ": ${Message}" && git push [ "$1" = "newpost" ] && [ -n "$2" ] && [ -n "$3" ] && \ mkdir -p "./assets/media/games/$2" && \ + echo "Add $2 [$3]" > .CommitMessage.txt && \ cat << [EOF] > "./_posts/$3-$2.md" --- layout: "post"