diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-09-02 18:51:20 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-09-02 18:51:20 +0200 |
commit | 022985f098a206c3b7852fe08a798cd31623f10d (patch) | |
tree | 84a1a0b0a67fa95608641f8e47bd55e8c1cd11fb /autoimport.py | |
parent | c0cd9df1e6cb63d524939028f5f6a07c2c8c3da5 (diff) | |
download | debian-dedup-022985f098a206c3b7852fe08a798cd31623f10d.tar.gz |
add option -d --database for db path to all scripts
Diffstat (limited to 'autoimport.py')
-rwxr-xr-x | autoimport.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/autoimport.py b/autoimport.py index a0681b3..d44c012 100755 --- a/autoimport.py +++ b/autoimport.py @@ -83,9 +83,12 @@ def main(): help="avoid reimporting same versions") parser.add_option("-p", "--prune", action="store_true", help="prune packages old packages") + parser.add_option("-d", "--database", action="store", + default="test.sqlite3", + help="path to the sqlite3 database file") options, args = parser.parse_args() tmpdir = tempfile.mkdtemp(prefix=b"debian-dedup") - db = sqlite3.connect("test.sqlite3") + db = sqlite3.connect(options.database) cur = db.cursor() cur.execute("PRAGMA foreign_keys = ON;") e = concurrent.futures.ThreadPoolExecutor(multiprocessing.cpu_count()) |