From 4f13e9cc0c044ec5f6d93a5efa68bfb4b2f141e6 Mon Sep 17 00:00:00 2001 From: firebadnofire Date: Mon, 21 Apr 2025 17:45:22 +0000 Subject: [PATCH] update-build --- build.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4e32cfa..695b20d 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,15 @@ #!/bin/bash +if [[ -z "${!1+x}" ]]; then + echo "Error: Variable '$1' is not set" + exit 1 +fi + hugo --cleanDestinationDir -sudo rsync -av --delete ./public/ /var/www/g/public/ +sudo rsync -av --delete ./public/ /var/www/pol/public/ +git add . + +git commit -S -m "$1" + +git push