summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok cheetah2024-12-18 17:46:47 +0100
committeruvok cheetah2024-12-18 17:46:47 +0100
commit397524b400bae757d59dd63f47813264002e7627 (patch)
treefc49da4f93a03270e34af3eabd8ecbc42637564b
parentf273bcdcf7acb7c69f1ae279d9f20a8b58726f06 (diff)
Shellcheck, make executable
-rwxr-xr-x[-rw-r--r--]editpost.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/editpost.sh b/editpost.sh
index 2c0213b..2a9bcf4 100644..100755
--- a/editpost.sh
+++ b/editpost.sh
@@ -9,7 +9,8 @@ fi
update_last_modified_at() {
local file="$1"
- local current_date="$(date +"%Y-%m-%d %H:%M %z")"
+ local current_date
+ current_date="$(date +"%Y-%m-%d %H:%M %z")"
if grep -q '^last_modified_at:' "$file"; then
sed -i "s|^last_modified_at:.*|last_modified_at: $current_date|" "$file"
else