From 44e7d69444accdd75f0568ef4a58a6ecb9094b6c Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Mon, 30 Mar 2015 21:33:56 +0200 Subject: [PATCH] Updates to the 'simple' example. --- examples/simple/job_import.sh | 7 +++++-- examples/simple/simple.json | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/simple/job_import.sh b/examples/simple/job_import.sh index 0d14471..e589470 100755 --- a/examples/simple/job_import.sh +++ b/examples/simple/job_import.sh @@ -1,7 +1,10 @@ #!/bin/sh + MYSQL_DEFAULTS_FILE="my.cnf" MYSQL="mysql --defaults-file=$MYSQL_DEFAULTS_FILE" -echo "echo 'DROP DATABASE scriptform_acc' | $MYSQL" -echo "$MYSQL < dbs/${sample_db}.sql" +echo "This is what would be executed if this wasn't a fake script:" +echo +echo "echo 'DROP DATABASE $target_db' | $MYSQL" +echo "$MYSQL ${target_db} < ${sql_file}" diff --git a/examples/simple/simple.json b/examples/simple/simple.json index a899499..3f94b81 100644 --- a/examples/simple/simple.json +++ b/examples/simple/simple.json @@ -3,7 +3,7 @@ "forms": { "import": { "title": "Import data", - "description": "Import CSV data into a database", + "description": "Import SQL into a database", "submit_title": "Import", "script": "job_import.sh", "fields": [ @@ -17,8 +17,8 @@ ] }, { - "name": "csv_file", - "title": "CSV file", + "name": "sql_file", + "title": "SQL file", "type": "file" } ]