@@ -0,0 +1,1115 @@
+#!/usr/bin/python%0A%0A## Binary Analysis Tool%0A## Copyright 2013 Armijn Hemel for Tjaldur Software Governance Solutions%0A## Licensed under Apache 2.0, see LICENSE file for details%0A%0A'''%0AThis script can be used to initialize the clone database.%0A'''%0A%0Aimport os, sys, sqlite3%0Afrom optparse import OptionParser%0A%0Adef main(argv):%0A        parser = OptionParser()%0A%09parser.add_option(%22-d%22, %22--database%22, dest=%22db%22, help=%22path to clone database%22, metavar=%22FILE%22)%0A%09(options, args) = parser.parse_args()%0A%09if options.db == None:%0A                parser.error(%22Path to clone database file needed%22)%0A        try:%0A                conn = sqlite3.connect(options.db)%0A        except:%0A                print %22Can't open clone database file%22%0A                sys.exit(1)%0A%0A%09c = conn.cursor()%0A%0A%09## create clone tables%0A%09c.execute('''create table if not exists renames (originalname text, newname text)''')%0A%09c.execute('''create index if not exists renames_index on renames (originalname)''')%0A%09c.execute('''create index if not exists renames_index on renames (newname)''')%0A%0A%09conn.commit()%0A%09c.close()%0A%0Aif __name__ == %22__main__%22:%0A        main(sys.argv)%0A

add script to initialize clone database