]> Cypherpunks.ru repositories - nncp.git/blobdiff - makedist.sh
Do not include huge Noise testvectors in tarball
[nncp.git] / makedist.sh
index 30863852f8113a5f95fada94e4545467e2c078ea..311c2daec523c8e535baaf25c1419cc06a091ff9 100755 (executable)
@@ -28,7 +28,7 @@ golang.org/x/net
 golang.org/x/sys
 "
 for mod in $mods; do
-    mod_path=$(sed -n "s#^     \($mod\) \(.*\)\$#\1@\2#p" src/$mod_name/go.mod)
+    mod_path=$(sed -n "s# // indirect## ; s#^  \($mod\) \(.*\)\$#\1@\2#p" src/$mod_name/go.mod)
     [ -n "$mod_path" ]
     mkdir -p src/$mod
     ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
@@ -77,6 +77,8 @@ mv $tmp/golang.org src
 
 find src -name .travis.yml -delete
 rm -fr src/github.com/davecgh/go-xdr/xdr
+rm -r src/github.com/flynn/noise/vector*
+rm src/github.com/hjson/hjson-go/build_release.sh
 rm src/github.com/gorhill/cronexpr/APLv2
 rm -fr ports
 rm makedist.sh
@@ -88,16 +90,77 @@ You can obtain releases source code prepared tarballs on
 @url{http://www.nncpgo.org/}.
 EOF
 make -C doc
-./supplementary_files.sh
-rm -r \
-    doc/.gitignore \
-    doc/.well-known \
-    doc/nncp.html/.well-known \
-    supplementary_files.sh
-
-find . -type d -exec chmod 700 {} \;
-find . -type f -exec chmod 600 {} \;
-find . -type f -name "*.sh" -exec chmod 700 {} \;
+
+########################################################################
+# Supplementary files autogeneration
+########################################################################
+texi=`mktemp`
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS
+
+@node News
+@unnumbered News
+
+`sed -n '5,$p' < doc/news.texi`
+
+@bye
+EOF
+makeinfo --plaintext -o NEWS $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS.RU
+
+@node Новости
+@unnumbered Новости
+
+`sed -n '3,$p' < doc/news.ru.texi | sed 's/^@subsection/@section/'`
+
+@bye
+EOF
+makeinfo --plaintext -o NEWS.RU $texi
+
+rm -f $texi
+
+texi=$(TMPDIR=doc mktemp)
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle INSTALL
+
+@include install.texi
+
+@bye
+EOF
+makeinfo --plaintext -o INSTALL $texi
+rm -f $texi
+
+texi=`mktemp`
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle THANKS
+
+`cat doc/thanks.texi`
+
+@bye
+EOF
+makeinfo --plaintext -o THANKS $texi
+rm -f $texi
+
+########################################################################
+
+mv doc/.well-known/openpgpkey/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc PUBKEY.asc
+rm -r doc/.gitignore doc/.well-known doc/nncp.html/.well-known
+
+find . -type d -exec chmod 755 {} \;
+find . -type f -exec chmod 644 {} \;
+find . -type f -name "*.sh" -exec chmod 755 {} \;
 
 cd ..
 tar cvf nncp-"$release".tar --uid=0 --gid=0 --numeric-owner nncp-"$release"