VERSION | 2 +- doc/cmds.texi | 5 +++-- doc/download.texi | 4 ++++ doc/news.ru.texi | 8 ++++++++ doc/news.texi | 8 ++++++++ ports/nncp/Makefile | 2 +- src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go | 14 +++++++++++--- diff --git a/VERSION b/VERSION index b2d9c79b0847f7dcf450448ffd8a3942113d33acc6bcbbbd7d4be79aab4940c3..536306498832f2aaecf181328808f05a5017c75731dc888237eada0ff60c5b6e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9 +0.10 diff --git a/doc/cmds.texi b/doc/cmds.texi index 12ecf3acad63f2ca39817ed66421624787936a1ecd01e022d63fdba90b64770c..02f3680828170178cdda5ab576c0d22a3a857596ee4b4cf2895982139e168eb2 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -219,12 +219,13 @@ @node nncp-freq @section nncp-freq @verbatim -% nncp-freq [options] NODE:SRC DST +% nncp-freq [options] NODE:SRC [DST] @end verbatim Send file request to @option{NODE}, asking it to send its @file{SRC} file from @ref{CfgFreq, freq} directory to our node under @file{DST} -filename in our @ref{CfgIncoming, incoming} one. +filename in our @ref{CfgIncoming, incoming} one. If @file{DST} is not +specified, then last element of @file{SRC} will be used. If @ref{CfgNotify, notification} is enabled on the remote side for file request, then it will sent simple letter after successful file diff --git a/doc/download.texi b/doc/download.texi index ce45e4ba93f8ecb050cea677b20c0dc30b5c6fc335534c359deddcdaf239ad1b..c10d0c76f59b50d76d5abbc991e76a2b26e3eb05e5826a972dbfc8b1ce228010 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -24,6 +24,10 @@ @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} @headitem Version @tab Size @tab Tarball @tab SHA256 checksum +@item @ref{Release 0.9, 0.9} @tab 942 KiB +@tab @url{download/nncp-0.9.tar.xz, link} @url{download/nncp-0.9.tar.xz.sig, sign} +@tab @code{8D0765A5 F9D81086 7E1F5AB4 52A9464D C5035CCB 4E09A29A 9C9A4934 1A72AB2C} + @item @ref{Release 0.8, 0.8} @tab 932 KiB @tab @url{download/nncp-0.8.tar.xz, link} @url{download/nncp-0.8.tar.xz.sig, sign} @tab @code{9BD607D5 C5551857 B7E9277D 0E857936 1DB7353A E0F1556E EA9B1D91 8305B184} diff --git a/doc/news.ru.texi b/doc/news.ru.texi index cf65a2d2e84e5103675558641c70992d8f66c58f1d34f0cb7fbef8bfd9c7868d..42e55619e30a2a247d6d27f0018aed1ec1f44f67b838c0c3b1d04e02da829676 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,14 @@ @node Новости @section Новости +@node Релиз 0.10 +@subsection Релиз 0.10 +@itemize +@item +@file{DST} аргумент @command{nncp-freq} команды теперь опционален. +По-умолчанию будет подставлен последний элемент @file{SRC} пути. +@end itemize + @node Релиз 0.9 @subsection Релиз 0.9 @itemize diff --git a/doc/news.texi b/doc/news.texi index 7bce2b5213bc2c15d6edc6f02f53c88a86ccaa45961a5ead0a8be07013bb069b..b6b3f268adb6e7a1631d54ea364f296a0ae7fae38bf674939442d4f9edc5e631 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,14 @@ @unnumbered News See also this page @ref{Новости, on russian}. +@node Release 0.10 +@section Release 0.10 +@itemize +@item +@command{nncp-freq}'s @file{DST} argument is optional now. Last +@file{SRC} path's element will be used by default. +@end itemize + @node Release 0.9 @section Release 0.9 @itemize diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index dc6c3dce8c744957caefc2ab4b36b3ea2c1a4d0ea896148c3f2a9ac577d263bf..f7c9ea8cba1b0909f3a8c0c51d7004f0b626182d9dee67983554c71ac0b0674c 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= nncp -PORTVERSION= 0.9 +PORTVERSION= 0.10 CATEGORIES= net MASTER_SITES= http://www.nncpgo.org/download/ \ http://sourceforge.net/projects/nncp/files/ diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go index 4ebfca3d8e97bbec1fc477f4d8689554813aca576a831f0067c768cbdea371a2..93e1a8798f1b7d37433ee5f61b394965a89f8f666a9871a6bd484bf879b16c6c 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go @@ -25,6 +25,7 @@ "fmt" "io/ioutil" "log" "os" + "path/filepath" "strings" "cypherpunks.ru/nncp" @@ -33,7 +34,7 @@ func usage() { fmt.Fprintf(os.Stderr, nncp.UsageHeader()) fmt.Fprintln(os.Stderr, "nncp-freq -- send file request\n") - fmt.Fprintf(os.Stderr, "Usage: %s [options] NODE:SRC DST\nOptions:\n", os.Args[0]) + fmt.Fprintf(os.Stderr, "Usage: %s [options] NODE:SRC [DST]\nOptions:\n", os.Args[0]) flag.PrintDefaults() } @@ -57,7 +58,7 @@ if *version { fmt.Println(nncp.VersionGet()) return } - if flag.NArg() != 2 { + if flag.NArg() == 0 { usage() os.Exit(1) } @@ -90,11 +91,18 @@ if err != nil { log.Fatalln("Invalid NODE specified:", err) } + var dst string + if flag.NArg() == 2 { + dst = flag.Arg(1) + } else { + dst = filepath.Base(splitted[1]) + } + if err = ctx.TxFreq( node, nice, splitted[1], - flag.Arg(1), + dst, int64(*minSize)*1024, ); err != nil { log.Fatalln(err)