]> git.saurik.com Git - cycript.git/blame - libcycript.py
Logically order type specifier cases in sig/parse.
[cycript.git] / libcycript.py
CommitLineData
8d20f0f1
JF
1#!/usr/bin/python
2
3import os
4import sqlite3
5import sys
6
7keys = {}
8
9for db in sys.argv[2:]:
10 with sqlite3.connect(db) as sql:
11 c = sql.cursor()
83e1cbb8
JF
12 for name, system, flags, code in c.execute('select name, system, flags, code from cache'):
13 key = (name, flags, code)
8d20f0f1
JF
14 keys[key] = keys.get(key, 0) | system
15
16db = sys.argv[1]
17with sqlite3.connect(db) as sql:
18 many = []
19 for key, system in keys.items():
83e1cbb8
JF
20 name, flags, code = key
21 many.append((name, system, flags, code))
8d20f0f1 22 c = sql.cursor()
83e1cbb8 23 c.executemany("insert into cache (name, system, flags, code) values (?, ?, ?, ?)", many)