From f37b98cbee9f6db568dfc0cef03c28552d5e7bed Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 18 Dec 2017 15:02:24 +0100 Subject: [PATCH] Moved helper scripts to bin/ dir. --- .gitignore | 1 + clean_dupes.php => bin/clean_dupes.php | 2 +- bin/get_data.sh | 5 +++++ bin/initdb.sh | 3 +++ parse_files.php => bin/parse_files.php | 4 ++-- bin/put_data.sh | 5 +++++ bin/put_db.sh | 4 ++++ config.ini.example | 2 ++ initdb.sh | 2 -- lib/TclUpdates/SQLiteReader.php | 2 +- lib/TclUpdates/SQLiteWriter.php | 2 +- 11 files changed, 25 insertions(+), 7 deletions(-) rename clean_dupes.php => bin/clean_dupes.php (94%) create mode 100755 bin/get_data.sh create mode 100755 bin/initdb.sh rename parse_files.php => bin/parse_files.php (92%) create mode 100755 bin/put_data.sh create mode 100755 bin/put_db.sh create mode 100755 config.ini.example delete mode 100755 initdb.sh diff --git a/.gitignore b/.gitignore index c0c4d69..c0b211b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /data/ +/config.ini /otadb.db3 diff --git a/clean_dupes.php b/bin/clean_dupes.php similarity index 94% rename from clean_dupes.php rename to bin/clean_dupes.php index 0c280cb..ad84c76 100755 --- a/clean_dupes.php +++ b/bin/clean_dupes.php @@ -1,7 +1,7 @@ #!/usr/bin/env php dbFile = 'otadb.db3'; + $this->dbFile = __DIR__ . '/../../otadb.db3'; $this->pdo = new \PDO('sqlite:' . $this->dbFile); if ($this->pdo === false) { return false; diff --git a/lib/TclUpdates/SQLiteWriter.php b/lib/TclUpdates/SQLiteWriter.php index 94f8179..52155f0 100644 --- a/lib/TclUpdates/SQLiteWriter.php +++ b/lib/TclUpdates/SQLiteWriter.php @@ -9,7 +9,7 @@ class SQLiteWriter public function __construct() { - $this->dbFile = 'otadb.db3'; + $this->dbFile = __DIR__ . '/../../otadb.db3'; $this->pdo = new \PDO('sqlite:' . $this->dbFile); if ($this->pdo === false) { return false;