-tar cfCI - src $tmp/includes | tar xfC - src/cypherpunks.ru/gogost/vendor
-find . -name .git -type d | xargs rm -fr
-rm -fr www* makedist* TODO src/golang.org $tmp/includes
+
+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
+mkinfo --output INSTALL $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS
+@include news.texi
+@bye
+EOF
+mkinfo --output NEWS $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle FAQ
+@include faq.texi
+@bye
+EOF
+mkinfo --output FAQ $texi
+
+rm -rf .git
+redo-cleanup full
+rm -f \
+ $texi \
+ *.texi \
+ .gitignore \
+ clean.do \
+ makedist.sh \
+ style.css \
+ TODO \
+ VERSION.do \
+ www.do
+
+perl -i -npe "s/build/build -mod=vendor/" default.do
+perl -i -npe "s/test/test -mod=vendor/" bench.do
+
+find . -type d -exec chmod 755 {} \;
+find . -type f -exec chmod 644 {} \;
+chmod +x contrib/do