redo-ifchange usage.go
-perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < usage.go
+perl -ne 'print "$1\n" if /Version.*"(.*)"$/' <usage.go
graph generator. For example to visualize your dependencies with GraphViz:
@example
$ redo target [...] # to assure that **/.redo/*.dep are filled up
-$ redo-dot target [...] > 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
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}.
$ [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 <goredo-@value{VERSION}.tar.zst | tar xf -
$ cd goredo-@value{VERSION}/src
$ go build -mod=vendor
$ ./goredo -symlinks # create redo-* commands symlinks
@example
$ ssh-keygen -Y verify -f PUBKEY-SSH.pub -I goredo@@cypherpunks.su -n file \
- -s goredo-@value{VERSION}.tar.zst.sig < goredo-@value{VERSION}.tar.zst
+ -s goredo-@value{VERSION}.tar.zst.sig <goredo-@value{VERSION}.tar.zst
@end example
@end table
########################################################################
cd doc
-cat > download.texi <<EOF
+cat >download.texi <<EOF
You can obtain releases source code prepared tarballs on
@url{http://www.goredo.cypherpunks.su/}.
EOF
texi=$(mktemp)
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle NEWS
@node News
-`sed -n '3,$p' < news.texi`
+`sed -n '3,$p' <news.texi`
@bye
EOF
mkinfo --output NEWS $texi
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle INSTALL
EOF
mkinfo --output INSTALL $texi
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle THANKS
tarball=goredo-"$release".tar.zst
ssh-keygen -Y sign -f ~/.ssh/sign/goredo@cypherpunks.su -n file $tarball
gpg --armor --detach-sign --sign --local-user 3A528DDE952C7E93 "$tarball"
-meta4-create -fn "$tarball" -mtime "$tarball" \
+meta4ra-create -fn "$tarball" -mtime "$tarball" \
-sig-pgp "$tarball".asc -sig-ssh "$tarball".sig \
http://www.goredo.cypherpunks.su/download/"$tarball" \
- http://y.www.goredo.cypherpunks.su/download/"$tarball" < "$tarball" > "$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")
. $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
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'
. $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 <<EOF
+echo redo-ifchange l3 l2 >l1.do
+echo redo-ifchange l3 >l2.do
+cat >l3.do <<EOF
sleep 1
touch \$(date +%s).touch
EOF
. $SHARNESS_TEST_SRCDIR/sharness.sh
export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
-echo echo ok > 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 <<EOF
-echo ok > \$3
+cat >foo.do <<EOF
+echo ok >\$3
chmod +x \$3
EOF
redo foo
. $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 ./-- ]'
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"
export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
mkdir -p bin src
-cat > bin/default.do <<EOF
+cat >bin/default.do <<EOF
cd ../src
redo-ifchange src.go
echo bla bla bla
EOF
-echo source code > src/src.go
+echo source code >src/src.go
test_expect_success Build "redo bin/cmd"
stat1=`stat bin/cmd`
export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
mkdir -p sub
-cat > default.html.do <<EOF
+cat >default.html.do <<EOF
redo-ifchange \$2.pre
echo HTML
cat \$2.pre
EOF
-cat > default.pre.do <<EOF
+cat >default.pre.do <<EOF
redo-ifchange *.inc \$2.html.in
echo PRE
cat \$2.html.in
EOF
-echo FOOTER > footer.inc
-echo "<html>" > sub/index.html.in
+echo FOOTER >footer.inc
+echo "<html>" >sub/index.html.in
test_expect_success Build "redo sub/index.html"
stat1=`stat sub/index.html`
. $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 <<EOF
+echo redo-ifchange version.h >all.do
+cat >version.h.do <<EOF
redo-ifchange date version version.h.in
VERSION=\$(cat version)
DATE=\$(cat date)
cat "\$2".in |
sed -e "s/%%VERSION%%/\${VERSION}/g" \
-e "s/%%DATE%%/\${DATE}/g" \
- > "\$3"
+ >"\$3"
redo-stamp <"\$3"
EOF
-cat > version.do <<EOF
-echo some-vcs-version > "\$3"
+cat >version.do <<EOF
+echo some-vcs-version >"\$3"
redo-always
redo-stamp <"\$3"
EOF
-cat > date.do <<EOF
+cat >date.do <<EOF
date +'%Y%m%d_%H%M%S' >"\$3"
redo-always
redo-stamp <"\$3"
EOF
-cat > version.h.in <<EOF
+cat >version.h.in <<EOF
#define PRJ_VERSION "%%VERSION%%"
#define PRJ_BLDDATE "%%DATE%%"
EOF
. $SHARNESS_TEST_SRCDIR/sharness.sh
export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
-echo > foo.do
-cat > bar.do <<EOF
+echo >foo.do
+cat >bar.do <<EOF
redo-ifchange foo
echo bar
EOF
. $SHARNESS_TEST_SRCDIR/sharness.sh
export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
-echo exit 1 > 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 ]'
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 <<EOF
+echo whatever >a/b/c/dep
+cat >a/b/default.do <<EOF
echo called \$1
redo-ifcreate ../c/dep
redo-ifchange c/dep
. $SHARNESS_TEST_SRCDIR/sharness.sh
export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
-cat > our <<EOF
+cat >our <<EOF
a/b/c.d.do
a/b/default.d.do
a/b/default.do
default.do
EOF
touch default.do
-redo-whichdo a/b/c.d > their
+redo-whichdo a/b/c.d >their
test_expect_success expected "cmp --silent our their"
test_done