From 359d4eb59b5e58825268397d04054635a41124ae Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 24 Nov 2024 14:11:10 +0300 Subject: [PATCH] Unify redirection operator usage --- VERSION.do | 2 +- doc/cmds.texi | 4 ++-- doc/faq.texi | 2 +- doc/install.texi | 2 +- doc/integrity.texi | 2 +- makedist | 14 +++++++------- t/goredo-$1-touch.t | 2 +- t/goredo-both-ifcreate-ifchange.t | 4 ++-- t/goredo-build-uuid-for-fdood.t | 6 +++--- t/goredo-chmoding.t | 6 +++--- t/goredo-dashed-tgt.t | 4 ++-- t/goredo-default.do.t | 2 +- t/goredo-deps-after-cd.t | 4 ++-- t/goredo-deps.t | 8 ++++---- t/goredo-double-consideration.t | 14 +++++++------- t/goredo-empty-dep.t | 4 ++-- t/goredo-failed-build.t | 4 ++-- t/goredo-rel-ifcreate.t | 4 ++-- t/goredo-whichdo-regression.t | 4 ++-- 19 files changed, 46 insertions(+), 46 deletions(-) diff --git a/VERSION.do b/VERSION.do index 38d570c..05a7249 100644 --- a/VERSION.do +++ b/VERSION.do @@ -1,2 +1,2 @@ redo-ifchange usage.go -perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < usage.go +perl -ne 'print "$1\n" if /Version.*"(.*)"$/' whatever.dot -$ dot -Tpng whatever.dot > whatever.png # possibly add -Gsplines=ortho +$ redo-dot target [...] >whatever.dot +$ dot -Tpng whatever.dot >whatever.png # possibly add -Gsplines=ortho @end example @pindex redo-depfix diff --git a/doc/faq.texi b/doc/faq.texi index 7f65521..5f15fd2 100644 --- a/doc/faq.texi +++ b/doc/faq.texi @@ -26,7 +26,7 @@ Those who create an empty file if no @file{stdout} was written -- are failed implementations. redo is a tool to help people. Literally all targets can be safely -@code{redo-stamp < $3}-ed, reducing false positive out-of-dates. Of +@code{redo-stamp <$3}-ed, reducing false positive out-of-dates. Of course, with the correct @file{stdout}/@file{$3} working and placing necessary results in @file{$3}, instead of just silently feeding them in @command{redo-stamp}. diff --git a/doc/install.texi b/doc/install.texi index 001d732..2faabfa 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -43,7 +43,7 @@ Preferable way is to download tarball with the signature from website: $ [fetch|wget] http://www.goredo.cypherpunks.su/download/goredo-@value{VERSION}.tar.zst $ [fetch|wget] http://www.goredo.cypherpunks.su/download/goredo-@value{VERSION}.tar.zst.@{asc,sig@} [verify signature] -$ zstd -d < goredo-@value{VERSION}.tar.zst | tar xf - +$ zstd -d download.texi <download.texi < $texi <$texi < $texi <$texi < $texi < $texi <$texi < "$tarball".meta4 + http://y.www.goredo.cypherpunks.su/download/"$tarball" <"$tarball" >"$tarball".meta4 size=$(( $(stat -f %z $tarball) / 1024 )) release_date=$(date "+%Y-%m-%d") diff --git a/t/goredo-$1-touch.t b/t/goredo-$1-touch.t index 0d73b02..19abeb3 100755 --- a/t/goredo-$1-touch.t +++ b/t/goredo-$1-touch.t @@ -5,7 +5,7 @@ test_description="Check failing if unexistent \$1 is touched" . $SHARNESS_TEST_SRCDIR/sharness.sh export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 -echo touch \$1 > foo.do +echo touch \$1 >foo.do test_expect_success "it fails" 'redo foo ; [ $? = 1 ]' test_done diff --git a/t/goredo-both-ifcreate-ifchange.t b/t/goredo-both-ifcreate-ifchange.t index e269fb4..81b209b 100755 --- a/t/goredo-both-ifcreate-ifchange.t +++ b/t/goredo-both-ifcreate-ifchange.t @@ -6,8 +6,8 @@ test_description="Check that warning exists when using both ifcreate/ifchange" export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 touch src -echo redo-ifchange src > tgt.do -echo redo-ifcreate src >> tgt.do +echo redo-ifchange src >tgt.do +echo redo-ifcreate src >>tgt.do redo tgt 2>2 test_expect_success "warn exists" 'grep -q "simultaneous ifcreate and ifchange" 2' diff --git a/t/goredo-build-uuid-for-fdood.t b/t/goredo-build-uuid-for-fdood.t index db952a5..f464767 100755 --- a/t/goredo-build-uuid-for-fdood.t +++ b/t/goredo-build-uuid-for-fdood.t @@ -5,9 +5,9 @@ test_description="Passed known OOD targets must not skip BuildUUID check" . $SHARNESS_TEST_SRCDIR/sharness.sh export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 -echo redo-ifchange l3 l2 > l1.do -echo redo-ifchange l3 > l2.do -cat > l3.do <l1.do +echo redo-ifchange l3 >l2.do +cat >l3.do < foo.do +echo echo ok >foo.do redo foo test_expect_success "foo is non executable" '[ ! -x foo ]' inode0=`perl -e '@s=stat "foo"; print "$s[1]\n"'` -cat > foo.do < \$3 +cat >foo.do <\$3 chmod +x \$3 EOF redo foo diff --git a/t/goredo-dashed-tgt.t b/t/goredo-dashed-tgt.t index 8f6f408..5bbac3e 100755 --- a/t/goredo-dashed-tgt.t +++ b/t/goredo-dashed-tgt.t @@ -5,12 +5,12 @@ test_description="Check that dashed targets are not treated as options" . $SHARNESS_TEST_SRCDIR/sharness.sh export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 -echo echo \$1 > default.do +echo echo \$1 >default.do redo -- ok test_expect_success "redo skips dashes" '[ ! -e ./-- ]' test_expect_success "redo mades ok" '[ -s ok ]' -echo "redo-ifchange -- ok" > foo.do +echo "redo-ifchange -- ok" >foo.do rm ok redo foo test_expect_success "dashes made" '[ -s ./-- ]' diff --git a/t/goredo-default.do.t b/t/goredo-default.do.t index f178256..e5c8825 100755 --- a/t/goredo-default.do.t +++ b/t/goredo-default.do.t @@ -6,7 +6,7 @@ test_description="Building of default.do must not depend on itself" export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 mkdir foo -echo echo echo ok > default.do +echo echo echo ok >default.do redo foo/default.do test_expect_success "repeated" "redo foo/default.do" test_expect_success "repeated again" "redo foo/default.do" diff --git a/t/goredo-deps-after-cd.t b/t/goredo-deps-after-cd.t index e0432e7..720123c 100755 --- a/t/goredo-deps-after-cd.t +++ b/t/goredo-deps-after-cd.t @@ -6,12 +6,12 @@ test_description="Check that dependencies have correct relative path after cd" export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 mkdir -p bin src -cat > bin/default.do <bin/default.do < src/src.go +echo source code >src/src.go test_expect_success Build "redo bin/cmd" stat1=`stat bin/cmd` diff --git a/t/goredo-deps.t b/t/goredo-deps.t index 34ba504..2417530 100755 --- a/t/goredo-deps.t +++ b/t/goredo-deps.t @@ -6,18 +6,18 @@ test_description="Check that the following use-case won't rebuild everytime and export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 mkdir -p sub -cat > default.html.do <default.html.do < default.pre.do <default.pre.do < footer.inc -echo "" > sub/index.html.in +echo FOOTER >footer.inc +echo "" >sub/index.html.in test_expect_success Build "redo sub/index.html" stat1=`stat sub/index.html` diff --git a/t/goredo-double-consideration.t b/t/goredo-double-consideration.t index 4e7847a..fca94b3 100755 --- a/t/goredo-double-consideration.t +++ b/t/goredo-double-consideration.t @@ -5,28 +5,28 @@ test_description="Do not fail if two always-ed targets run simultaneously" . $SHARNESS_TEST_SRCDIR/sharness.sh export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 -echo redo-ifchange version.h > all.do -cat > version.h.do <all.do +cat >version.h.do < "\$3" + >"\$3" redo-stamp <"\$3" EOF -cat > version.do < "\$3" +cat >version.do <"\$3" redo-always redo-stamp <"\$3" EOF -cat > date.do <date.do <"\$3" redo-always redo-stamp <"\$3" EOF -cat > version.h.in <version.h.in < foo.do -cat > bar.do <foo.do +cat >bar.do < bar.do -echo redo-ifchange bar > foo.do +echo exit 1 >bar.do +echo redo-ifchange bar >foo.do test_expect_success "first fail" 'redo foo ; [ $? = 1 ]' test_expect_success "second fail" 'redo foo ; [ $? = 1 ]' diff --git a/t/goredo-rel-ifcreate.t b/t/goredo-rel-ifcreate.t index 61d5349..816de99 100755 --- a/t/goredo-rel-ifcreate.t +++ b/t/goredo-rel-ifcreate.t @@ -6,8 +6,8 @@ test_description="Proper relative to DirPrefix ifcreate paths" export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 mkdir -p a/b/c a/c -echo whatever > a/b/c/dep -cat > a/b/default.do <a/b/c/dep +cat >a/b/default.do < our <our < their +redo-whichdo a/b/c.d >their test_expect_success expected "cmp --silent our their" test_done -- 2.48.1