File: getsqlite.pl

package info (click to toggle)
libdbd-sqlite2-perl 2%3A0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,692 kB
  • ctags: 2,312
  • sloc: ansic: 27,895; perl: 1,730; makefile: 11
file content (52 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use strict;
use LWP::Simple qw(getstore);
use Fatal qw(chdir);
use ExtUtils::Command;

my $version = shift || die "Usage: getsqlite.pl <version>\n";

print("downloading http://www.sqlite.org/sqlite-$version.tar.gz\n");
if (getstore(
	"http://www.sqlite.org/sqlite-$version.tar.gz", 
	"sqlite.tar.gz") != 200) {
   die "Failed to download";
}
print("done\n");

rm_rf('sqlite');
xsystem("tar zxvf sqlite.tar.gz");
chdir("sqlite");
xsystem("sh configure --enable-utf8");
xsystem("make parse.c sqlite.h opcodes.h opcodes.c");

my %skip = map { $_ => 1 } map { chomp; $_ } <DATA>;
warn("Skip: $_\n") for keys %skip;

foreach (<*.[ch]>, `find src -name \\*.[ch]`) {
    chomp;
    next if $skip{$_};
    xsystem("cp $_ ../");
}

exit(0);

sub xsystem {
    local $, = ", ";
    print("@_\n");
    my $ret = system(@_);
    if ($ret != 0) {
       die "system(@_) failed: $?";
    }
}

__DATA__
lempar.c
src/threadtest.c
src/test1.c
src/test2.c
src/test3.c
src/tclsqlite.c
src/shell.c
src/lemon.c
src/md5.c