From a4c9bf993ac5968c01effdbb41dfa10a8b7d255e Mon Sep 17 00:00:00 2001 From: Tristan Ancelet Date: Mon, 15 May 2023 18:19:03 -0500 Subject: [PATCH] Added a bit of documentation --- Scripts/update-database.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Scripts/update-database.sh b/Scripts/update-database.sh index 2e203e0..1ed5e72 100755 --- a/Scripts/update-database.sh +++ b/Scripts/update-database.sh @@ -31,7 +31,9 @@ for dir in ${crontab_dirs[@]}; do INSERT INTO crontabs (crontab_path, crontab_data) VALUES ('$file', '$($"$(<$file)")'); - " + " # (2023-05-15) + # Had to add the $"..." to the statement above because the script was attempting to load + # and execute the script on trying to load it into the db fi done fi @@ -50,7 +52,9 @@ while read crontab_id crontab_path; do if [[ -f "$crontab_path" ]] && [[ ! "$data" == "$(<$crontab_path)" ]]; then sqlite3 $WEBCRON_DB " UPDATE crontabs SET crontab_data = '$($"(<$crontab_path)")' WHERE crontab_id = $crontab_id - " + " # (2023-05-15) + # Had to add the $"..." to the statement above because the script was attempting to load + # and execute the script on trying to load it into the db fi done <<< ` sqlite3 $WEBCRON_DB <<< "