]> Sergey Matveev's repositories - tofuproxy.git/commitdiff
Unify redirection operator usage
authorSergey Matveev <stargrave@stargrave.org>
Thu, 18 Apr 2024 10:28:38 +0000 (13:28 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 18 Apr 2024 10:29:13 +0000 (13:29 +0300)
12 files changed:
VERSION.do
doc/certs.texi
doc/install.texi
doc/integrity.texi
doc/restricted.texi
doc/spies.texi
doc/tlsauth.texi
doc/usage.texi
doc/warcs.texi
fifos/multitail
makedist
state-init

index 90ff3e2d59915bbb1213c245858d5b332c1a95f2..9197a49b0f244d794fcab1277e73b58371133360 100644 (file)
@@ -1,2 +1,2 @@
 redo-ifchange version.go
-perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < version.go
+perl -ne 'print "$1\n" if /Version.*"(.*)"$/' <version.go
index 9d66fa134c1a9dee1585a6193b72ae1bb8efeb44..5fcf60f9723bc1b8606357954ccb2be5c534909a 100644 (file)
@@ -30,5 +30,5 @@ $ cat fifos/list-@{accepted,rejected,http-auth,tls-auth@}
 To remove knowledge of the host from any of the states mentioned above:
 
 @example
-$ echo www.example.com > fifos/del-tls-auth
+$ echo www.example.com >fifos/del-tls-auth
 @end example
index 9d7dff718f256e5a4c57794ee933e7be3144c22e..2bd9135d95c0ffd423b14debf5b4c6ac004e065d 100644 (file)
@@ -10,7 +10,7 @@ WARCs support.
 $ [fetch|wget] http://www.tofuproxy.stargrave.org/download/tofuproxy-@value{VERSION}.tar.zst
 $ [fetch|wget] http://www.tofuproxy.stargrave.org/download/tofuproxy-@value{VERSION}.tar.zst.@{asc,sig@}
 [verify signature]
-$ zstd -d < tofuproxy-@value{VERSION}.tar.zst | tar xf -
+$ tar xf tofuproxy-@value{VERSION}.tar.zst
 $ cd tofuproxy-@value{VERSION}
 $ ./build
 @end example
index 04571a7011bc28defc643ff27935391e9d38bdb8..f44863afd124f7420b9d870dad909b2ea2c801d7 100644 (file)
@@ -28,7 +28,7 @@ $ gpg --auto-key-locate  wkd --locate-keys tofuproxy at stargrave dot org
 
 @example
 $ ssh-keygen -Y verify -f PUBKEY-SSH.pub -I tofuproxy@@cypherpunks.ru -n file \
-    -s tofuproxy-@value{VERSION}.tar.zst.sig < tofuproxy-@value{VERSION}.tar.zst
+    -s tofuproxy-@value{VERSION}.tar.zst.sig <tofuproxy-@value{VERSION}.tar.zst
 @end example
 
 @end table
index 0774315a1ed822a4ff67b7d5ae4e3810f05e2b44..fdceca198bdb8fdca5b0226f831c42109463f119 100644 (file)
@@ -7,7 +7,7 @@ CA. For example you want to limit CA with SPKI's SHA256 hash of
 to domains only in @code{stargrave.org} tree:
 
 @example
-$ tee fifos/add-restricted < contrib/restricted.txt
+$ tee fifos/add-restricted <contrib/restricted.txt
 9215d9eeddeb403b0ffebb228cfc13104da825117d3640a0dfbfc0c08a012124 stargrave.org
 [...]
 @end example
index 1b9237261c69c71c431d3136064d0e6c8aeace98..5cb634b28141a8582a0b08657608bd2c4ca2770a 100644 (file)
@@ -5,7 +5,7 @@ You can reject requests to the whole domains. As a rule some spying ones
 (for advertisements and better user experience, they say).
 
 @example
-$ tee fifos/add-spies < contrib/spies.txt
+$ tee fifos/add-spies <contrib/spies.txt
 ads.google.com
 advertising.yandex.ru
 [...]
index 31ea224484c63ee6ae5dc1dab032f4b4eabe7944..ef8039fac6f1b42f1c3f2c2f18867ccb1346f4b4 100644 (file)
@@ -18,11 +18,11 @@ gemini.example.com  NONE
 To delete one of them:
 
 @example
-$ echo example.com > fifos/del-tls-auth
+$ echo example.com >fifos/del-tls-auth
 @end example
 
 To preadd:
 
 @example
-$ echo example.com path/to/client.cert.pem > fifos/add-tls-auth
+$ echo example.com path/to/client.cert.pem >fifos/add-tls-auth
 @end example
index 57b0b3d50cf6feec2a15295902204d7d2372261e..0ea417fa83162193d4f2d53856463acedb4b623e 100644 (file)
@@ -34,7 +34,7 @@ main.go:70: listening: [::1]:8080 dns: [::1]:53 certs: ./certs ccerts: ./ccerts
 @item Trust your newly generated CA:
 
 @example
-# cat cert.pem >> /etc/ssl/cert.pem
+# cat cert.pem >>/etc/ssl/cert.pem
 @end example
 
 @item Point you HTTP/HTTPS clients to @code{http://localhost:8080} proxy.
index 7408e9137fd85c8141717d5290c9ed454364627b..757f344c82c255fbaa0ac418248af254484b3364 100644 (file)
@@ -38,7 +38,7 @@ opened).
 Load WARCs:
 
 @example
-$ tee fifos/add-warcs < warcs.txt
+$ tee fifos/add-warcs <warcs.txt
 smth.warc-00000.warc.gz
 smth.warc-00001.warc.gz
 smth.warc-00002.warc.gz
@@ -64,7 +64,7 @@ smth.warc-00000.warc.gz 154
 smth.warc-00001.warc.gz 13
 smth.warc-00002.warc.gz 0
 another.warc 123
-$ echo another.warc > fifos/del-warcs
+$ echo another.warc >fifos/del-warcs
 @end example
 
 One possibility that @file{smth.warc-00002.warc.gz} has no URIs is that
@@ -73,7 +73,7 @@ it contains continuation segmented records.
 @end itemize
 
 Loading of WARC involves its whole reading and remembering where is each
-URI response is located. You can @code{echo SAVE > fifos/add-warcs} to
+URI response is located. You can @code{echo SAVE >fifos/add-warcs} to
 save in-memory index to the disk as @file{....idx.gob} files. During
 the next load, if those files exists, they are used as index immediately,
 without expensive WARC parsing.
@@ -100,7 +100,7 @@ and much higher decompression speed, than @file{.warc.gz}.
 
 @example
 $ cmd/warc-extract/warc-extract -for-enzstd /path/to.warc.gz |
-    cmd/zstd/enzstd > /path/to.warc.zst
+    cmd/zstd/enzstd >/path/to.warc.zst
 @end example
 
 @url{https://www.gnu.org/software/wget/, GNU Wget} can be easily used to
index 05de2fd0af13323c1e4090050eb6a78272d82247..d12045048aa91785f7a0057fb49a95efbc874932 100755 (executable)
@@ -2,15 +2,15 @@
 
 exec multitail \
     -wh 10 \
-    -t "Trust" -ci magenta -l "while :; do tai64nlocal < log-cert ; done" \
-    -t "DANE" -ci yellow --label "DANE " -L "while :; do tai64nlocal < log-dane ; done" \
-    -t "Error" -ci red -L "while :; do tai64nlocal < log-err ; done" \
-    -t "HTTPAuth" -ci green --label "Auth " -L "while :; do tai64nlocal < log-http-auth ; done" \
-    -t "TLSAuth" -ci green --label "Auth " -l "while :; do tai64nlocal < log-tls-auth ; done" \
-    -t "Response non-OK" --label "< " -L "while :; do tai64nlocal < log-non-ok ; done" \
-    -t "Response OK" -ci green --label "< " -L "while :; do tai64nlocal < log-ok ; done" \
-    -t "Redirect " -ci cyan --label "R " -L "while :; do tai64nlocal < log-redir ; done" \
-    -t "Request" -ci blue --label "> " -L "while :; do tai64nlocal < log-req ; done" \
-    -t "TLS connection" -ci yellow --label "S " -L "while :; do tai64nlocal < log-tls ; done" \
-    -t "Various" -ci yellow -L "while :; do tai64nlocal < log-various ; done" \
-    -t "WARC" -ci green --label "W " -L "while :; do tai64nlocal < log-warc ; done"
+    -t "Trust" -ci magenta -l "while :; do tai64nlocal <log-cert ; done" \
+    -t "DANE" -ci yellow --label "DANE " -L "while :; do tai64nlocal <log-dane ; done" \
+    -t "Error" -ci red -L "while :; do tai64nlocal <log-err ; done" \
+    -t "HTTPAuth" -ci green --label "Auth " -L "while :; do tai64nlocal <log-http-auth ; done" \
+    -t "TLSAuth" -ci green --label "Auth " -l "while :; do tai64nlocal <log-tls-auth ; done" \
+    -t "Response non-OK" --label "< " -L "while :; do tai64nlocal <log-non-ok ; done" \
+    -t "Response OK" -ci green --label "< " -L "while :; do tai64nlocal <log-ok ; done" \
+    -t "Redirect " -ci cyan --label "R " -L "while :; do tai64nlocal <log-redir ; done" \
+    -t "Request" -ci blue --label "> " -L "while :; do tai64nlocal <log-req ; done" \
+    -t "TLS connection" -ci yellow --label "S " -L "while :; do tai64nlocal <log-tls ; done" \
+    -t "Various" -ci yellow -L "while :; do tai64nlocal <log-various ; done" \
+    -t "WARC" -ci green --label "W " -L "while :; do tai64nlocal <log-warc ; done"
index aae186e2b98b2abe30a101183dee0f56b60dc357..398e89b7ce05cc432a2b08e0eb2d1fc1912d8d9b 100755 (executable)
--- a/makedist
+++ b/makedist
@@ -13,7 +13,7 @@ redo-ifchange VERSION
 
 ########################################################################
 cd doc
-cat > download.texi <<EOF
+cat >download.texi <<EOF
 You can obtain releases source code prepared tarballs on
 @url{http://www.tofuproxy.stargrave.org}.
 EOF
@@ -26,7 +26,7 @@ mkinfo() {
 
 texi=$(mktemp)
 
-cat > $texi <<EOF
+cat >$texi <<EOF
 \input texinfo
 @documentencoding UTF-8
 @settitle INSTALL
@@ -59,10 +59,10 @@ zstd -19 -v tofuproxy-"$release".tar
 tarball=tofuproxy-"$release".tar.zst
 ssh-keygen -Y sign -f ~/.ssh/sign/tofuproxy@stargrave.org -n file $tarball
 gpg --armor --detach-sign --sign --local-user 3477D3292C775BF39DAA0E075921D596A332F844 "$tarball"
-meta4-create -fn "$tarball" -mtime "$tarball" \
+meta4ra-create -fn "$tarball" -mtime "$tarball" \
     -sig-pgp "$tarball".asc -sig-ssh "$tarball".sig \
     http://www.tofuproxy.stargrave.org/download/"$tarball" \
-    http://y.www.tofuproxy.stargrave.org/download/"$tarball" < "$tarball" > "$tarball".meta4
+    http://y.www.tofuproxy.stargrave.org/download/"$tarball" <"$tarball" >"$tarball".meta4
 
 size=$(( $(stat -f %z $tarball) / 1024 ))
 release_date=$(date "+%Y-%m-%d")
index 53607c4e1dd122e75cabb6011ffa9e26fdd74a04..ca6468a779e09483815a2e1722bed7ca5933b516 100755 (executable)
@@ -4,7 +4,7 @@ root="$(dirname "$(realpath -- "$0")")"
 [ -s cert.pem ] || {
     prev=`umask`
     umask 077
-    "$root"/cmd/certgen/certgen > cert.pem
+    "$root"/cmd/certgen/certgen >cert.pem
     umask $prev
 }
 mkdir -p fifos