diff options
author | haturatu <taro@eyes4you.org> | 2024-12-10 23:57:20 +0900 |
---|---|---|
committer | haturatu <taro@eyes4you.org> | 2024-12-10 23:57:20 +0900 |
commit | bea36f617c5a6a2cfa1bde2ff1b68562f31f2adf (patch) | |
tree | 5770ef6863aaf74e2857375d3a6feb6150e87f82 | |
parent | 251bd8058cddbf4cf8a96d7ba647faf7d4c6359c (diff) |
fix blank comment check & add comment
-rwxr-xr-x | lumebuild.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lumebuild.sh b/lumebuild.sh index a6575fc..25a5072 100755 --- a/lumebuild.sh +++ b/lumebuild.sh @@ -1,20 +1,25 @@ #!/bin/bash +####################### # CONFIG +####################### LUME_DIR="/your/lume/dir" SRC_DIR="$LUME_DIR/src" BUILD_DIR="site" +######################## # OPTIONAL +######################## BLOG_URL="https://yourblog.url" POST_URL_DIR="posts" WEBPSH="/your/webp/convert/path" COMMIT_COMMENT="`echo "Memory" && free -h | head -2 | awk '{print $(NF-5)"," $(NF-4)"," $(NF-3)}' | column -t -s ","`" FEDI_CMT="y" -export DENO_INSTALL="/home/$USER/.deno" -export PATH="$DENO_INSTALL/bin:$PATH" +# Deno Env +export DENO_INSTALL="/home/$USER/.deno"; export PATH="$DENO_INSTALL/bin:$PATH" +# Commands check commands=("deno" "git" "toot" "cwebp") for cmd in "${commands[@]}"; do @@ -58,13 +63,17 @@ EOF` sed -i '/comments: {}/d' "$LAST_POST" } +######################## +# Main +######################## + git_commit if [ $? -eq 0 ]; then $WEBPSH cd $SRC_DIR/$POST_URL_DIR || exit - grep "^comments:$" "$(ls -tr | tail -1)" + egrep "^comments:.?.?.?$" "$(ls -tr | tail -1)" if [ $? -eq 0 ]; then build |