From 81689667e2f4d639b66c21f8475c1cd8dc2aed7b Mon Sep 17 00:00:00 2001 From: Tristan Ancelet Date: Sat, 27 May 2023 15:54:28 -0500 Subject: [PATCH] Pre-Test Push --- Scripts/update-database.sh | 6 +++--- Site | 2 +- test.php | 13 +++++++++++++ webcron | 0 webcrond.db | 0 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100755 test.php create mode 100644 webcron create mode 100644 webcrond.db diff --git a/Scripts/update-database.sh b/Scripts/update-database.sh index 1ed5e72..6339089 100755 --- a/Scripts/update-database.sh +++ b/Scripts/update-database.sh @@ -11,7 +11,7 @@ declare -a crontab_dirs=( ) declare -a crontabs_in_db -sqlite_cmd="sqlite3 $WEBCRON_DB" +sqlite_cmd="sqlite3 webcron.db" for name in $( $sqlite_cmd <<< "SELECT crontab_path FROM crontabs;"); do @@ -30,7 +30,7 @@ for dir in ${crontab_dirs[@]}; do $sqlite_cmd " INSERT INTO crontabs (crontab_path, crontab_data) VALUES ('$file', - '$($"$(<$file)")'); + '$(cat $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 @@ -51,7 +51,7 @@ while read crontab_id crontab_path; do # loaded into the db. if [[ -f "$crontab_path" ]] && [[ ! "$data" == "$(<$crontab_path)" ]]; then sqlite3 $WEBCRON_DB " - UPDATE crontabs SET crontab_data = '$($"(<$crontab_path)")' WHERE crontab_id = $crontab_id + 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 diff --git a/Site b/Site index dbc5587..b8ba9dc 160000 --- a/Site +++ b/Site @@ -1 +1 @@ -Subproject commit dbc5587bb686dfdadccd5baa315535317e91a595 +Subproject commit b8ba9dc5d46ebc968820ec10d30809323caa0806 diff --git a/test.php b/test.php new file mode 100755 index 0000000..0303d64 --- /dev/null +++ b/test.php @@ -0,0 +1,13 @@ +#!/usr/bin/php + +Load($db, ""); + +echo $table->get_html(); +?> diff --git a/webcron b/webcron new file mode 100644 index 0000000..e69de29 diff --git a/webcrond.db b/webcrond.db new file mode 100644 index 0000000..e69de29