2011-05-16 04:54:57 +00:00
|
|
|
#!/usr/bin/perl
|
2011-01-01 22:44:19 +00:00
|
|
|
|
2011-05-16 04:54:57 +00:00
|
|
|
use strict;
|
|
|
|
use FindBin qw($Bin);
|
2011-11-16 10:41:38 +00:00
|
|
|
use Getopt::Long;
|
2011-05-16 04:54:57 +00:00
|
|
|
|
|
|
|
system("$Bin/build.pl", "camput") and die "failed to build camput";
|
|
|
|
|
2011-11-16 10:41:38 +00:00
|
|
|
sub usage {
|
|
|
|
die "Usage: dev-camput [--tls] -- camput_args";
|
|
|
|
}
|
|
|
|
|
|
|
|
my $opt_tls;
|
|
|
|
GetOptions("tls" => \$opt_tls)
|
|
|
|
or usage();
|
|
|
|
|
2011-05-30 19:38:26 +00:00
|
|
|
# Respected by camli/osutil:
|
2011-05-16 04:54:57 +00:00
|
|
|
$ENV{"CAMLI_CONFIG_DIR"} = "$Bin/config/dev-client-dir";
|
2011-05-30 19:38:26 +00:00
|
|
|
|
|
|
|
# Respected by env expansions in config/dev-client-dir/config
|
|
|
|
$ENV{"CAMLI_SECRET_RING"} = "$Bin/lib/go/camli/jsonsign/testdata/test-secring.gpg";
|
2011-06-02 23:57:49 +00:00
|
|
|
$ENV{"CAMLI_KEYID"} = "26F5ABDA";
|
2011-05-30 19:38:26 +00:00
|
|
|
$ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs";
|
2011-11-16 10:41:38 +00:00
|
|
|
$ENV{CAMLI_AUTH} = "userpass:camlistore:pass3179";
|
|
|
|
my $blobserver = "http://localhost:3179/bs";
|
|
|
|
if ($opt_tls) {
|
|
|
|
$blobserver =~ s/^http/https/;
|
|
|
|
}
|
2011-05-30 19:38:26 +00:00
|
|
|
|
2011-09-21 01:29:10 +00:00
|
|
|
exec("$Bin/clients/go/camput/camput",
|
|
|
|
"--verbose",
|
2011-11-16 10:41:38 +00:00
|
|
|
"--blobserver=$blobserver",
|
2011-09-21 01:29:10 +00:00
|
|
|
@ARGV);
|