| Index: third_party/sqlite/src/interior.pl
|
| diff --git a/third_party/sqlite/src/interior.pl b/third_party/sqlite/src/interior.pl
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..414380301093a9282a0ccd45e01643f89f85d546
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/interior.pl
|
| @@ -0,0 +1,27 @@
|
| +#!/usr/bin/perl -w
|
| +
|
| +use strict;
|
| +use Getopt::Long;
|
| +
|
| +my $table = "interior";
|
| +GetOptions("table=s" => \$table);
|
| +
|
| +print "-- Create a tree with interior nodes.\n";
|
| +print "CREATE TABLE $table (\n";
|
| +print " file TEXT,\n";
|
| +print " lineno INT,\n";
|
| +print " line TEXT\n";
|
| +print ");\n";
|
| +
|
| +foreach my $file (@ARGV) {
|
| + print "SELECT 'Loading from $file';\n";
|
| + print "BEGIN;\n";
|
| + open(F, $file) || die("Open $file: $!");
|
| + while (<F>) {
|
| + chomp;
|
| + s/'/''/g;
|
| + print "INSERT INTO $table VALUES ('$file', $., '$_');\n";
|
| + }
|
| + close(F) || die("Close $file: $!");
|
| + print "COMMIT;\n";
|
| +}
|
|
|