From d410aab6bc2f0f80577b1d339e7caaf633fd6f4a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 20 Dec 2010 14:13:57 -0800 Subject: [PATCH] Rename camliup to camput; move. --- clients/go/{ => camput}/.gitignore | 3 ++- clients/go/{ => camput}/Makefile | 4 ++-- clients/go/{camliup.go => camput/camput.go} | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) rename clients/go/{ => camput}/.gitignore (52%) rename clients/go/{ => camput}/Makefile (74%) rename clients/go/{camliup.go => camput/camput.go} (88%) diff --git a/clients/go/.gitignore b/clients/go/camput/.gitignore similarity index 52% rename from clients/go/.gitignore rename to clients/go/camput/.gitignore index 9a3dc9110..3189f004b 100644 --- a/clients/go/.gitignore +++ b/clients/go/camput/.gitignore @@ -1,4 +1,5 @@ *.8 *.6 -camliup +camput + diff --git a/clients/go/Makefile b/clients/go/camput/Makefile similarity index 74% rename from clients/go/Makefile rename to clients/go/camput/Makefile index 21b1e1828..78c300a56 100644 --- a/clients/go/Makefile +++ b/clients/go/camput/Makefile @@ -1,8 +1,8 @@ include $(GOROOT)/src/Make.inc -TARG=camliup +TARG=camput GOFILES=\ - camliup.go\ + camput.go\ include $(GOROOT)/src/Make.cmd diff --git a/clients/go/camliup.go b/clients/go/camput/camput.go similarity index 88% rename from clients/go/camliup.go rename to clients/go/camput/camput.go index e82a8d417..a148e8dfd 100644 --- a/clients/go/camliup.go +++ b/clients/go/camput/camput.go @@ -16,10 +16,15 @@ import ( "strings" ) -var flagFile *string = flag.String("file", "", "file to upload") -var flagServer *string = flag.String("server", "http://localhost:3179/", "camlistore blob server") +// These override the JSON config file ~/.camlistore's "server" and +// "password" keys +var flagServer *string = flag.String("server", "", "camlistore blob server") var flagPassword *string = flag.String("password", "", "password for blob server") +// Things that can be uploaded. (at most one of these) +var flagBlob *string = flag.String("blob", "", "upload a file's bytes as a single blob") +var flagFile *string = flag.String("file", "", "upload a file's bytes as a blob, as well as its JSON file record") + type UploadHandle struct { blobref string contents io.ReadSeeker