]> Cypherpunks.ru repositories - gocheese.git/blobdiff - makedist.sh
Raise copyright years
[gocheese.git] / makedist.sh
index d43af8377ec6ca787ffecf3520e9c8e1c1eba3f7..87e7b6f988d32dd022347249bae203f51126de69 100755 (executable)
@@ -9,7 +9,15 @@ git clone . $tmp/gocheese-$release
 cd $tmp/gocheese-$release
 git checkout v$release
 
-mod_name=$(sed -n 's/^module //p' go.mod)
+redo-ifchange module-name VERSION
+mod_name=`cat module-name`
+
+cat > download.texi <<EOF
+You can obtain releases source code prepared tarballs on
+@url{http://www.gocheese.cypherpunks.ru/}.
+EOF
+redo gocheese.info
+
 crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
 mkdir -p src/$mod_name
 mv *.go go.mod go.sum src/$mod_name
@@ -64,19 +72,33 @@ tar cfCI - src $tmp/includes | tar xfC - $tmp
 rm -fr src/golang.org $tmp/includes
 mv $tmp/golang.org src
 
-cat > download.texi <<EOF
-@node Download
-@unnumbered Download
-You can obtain releases source code prepared tarballs on
-@url{http://gocheese.cypherpunks.ru/}.
+mkinfo() {
+    ${MAKEINFO:=makeinfo} --plaintext \
+        --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+        --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+        -D "VERSION `cat VERSION`" $@
+}
+
+texi=$(mktemp)
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle INSTALL
+@include install.texi
+@bye
 EOF
-make gocheese.info
+perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
+mkinfo --output INSTALL $texi
+rm $texi
 
-rm -rf .git .gitignore style.css makedist* www.mk
+rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do VERSION.do
+echo 'GOPATH=`pwd` ${GO:=go} build -o $3 `cat module-name`' > gocheese.do
+echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do
+cp ~/work/redo/minimal/do contrib/do
 
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
-chmod +x pyshop2packages.sh
+chmod 755 contrib/pyshop2packages.sh contrib/do
 
 cd ..
 tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
@@ -90,7 +112,7 @@ release_date=$(date "+%Y-%m-%d")
 
 cat <<EOF
 An entry for documentation:
-@item @ref{Release $release, $release} @tab $release_date @tab $size KiB
+@item $release @tab $release_date @tab $size KiB
 @tab @url{gocheese-${release}.tar.xz, link} @url{gocheese-${release}.tar.xz.sig, sign}
 @tab @code{$hash}
 EOF