forked from perkeep/perkeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-appengine
executable file
·45 lines (36 loc) · 916 Bytes
/
dev-appengine
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
#!/usr/bin/perl
use strict;
use FindBin qw($Bin);
use Getopt::Long;
sub usage {
die "Usage: dev-appengine [--wipe] [-a] [-p port] -- [other_dev_appserver_opts]";
}
my $opt_wipe;
my $opt_port;
my $opt_all; # listen on all interfaces
GetOptions("wipe" => \$opt_wipe,
"all" => \$opt_all,
"p=i" => \$opt_port,
) or usage();
my $sdk = readlink("$Bin/appengine-sdk")
or die "No App Engine SDK symlink; please:\n \$ ln -s /path/to/appengine-go-sdk $Bin/appengine-sdk\n\n";
my @args = (
"$sdk/dev_appserver.py",
"--skip_sdk_update_check",
"--high_replication",
);
if ($opt_all) {
push @args, "-a", "0.0.0.0";
}
if ($opt_wipe) {
push @args, "--clear_datastore";
}
if ($opt_port) {
push @args, "-p", "$opt_port";
} else {
push @args, "-p", "3179";
}
push @args, @ARGV;
push @args, "$Bin/server/go/appengine";
print "\$ @args\n";
exec(@args);