summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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