REDO-IFCREATE(1)
okay bestie, welcome to REDO-IFCREATE(1) from the General Commands Manual β aka redo-ifcreate β the page about rebuilding target files when source files are created. π
β¨ NAME β¨
redo-ifcreate β rebuild target files when source files are created. That's the whole assignment, no cap. π
πΈ SYNOPSIS πΈ
the synopsis is literally:
redo-ifcreate target [target]...
π DESCRIPTION π
so redo(1) is the build tool that builds files and rebuilds them if any of their dependencies have changed. redo-ifcreate, when invoked from a dofile, adds non-existence dependencies of the current redo(1) target on all files given as arguments. In bestie terms: it tells redo βthis target cares that these files are NOT here.β The consequence is that the current target will be rebuilt on invocation of redo(1) if any of the files given as arguments to redo-ifcreate exist. And if an argument to redo-ifcreate exists, it exits with a status code indicating failure. slay, but make it dependency tracking. β¨
π EXAMPLES π
Consider the following two files all.do and b.do:
all.do
#!/bin/sh
redo-ifchange b
b.do
#!/bin/sh
if [ ! -e c ]; then
redo-ifcreate c
fi
date +%s
Invoking redo(1) in a directory with these files that does not contain a file named c will build a file named b containing a timestamp. The next time redo(1) is invoked, it will only rebuild b if a file named c was created since the last build. This can be verified by invoking redo(1) repeatedly and examining the timestamp b after each invocation, then creating a file named c, invoking redo(1) again and examining the timestamp again. lowkey a whole detective arc. π΅οΈββοΈπ
π¦ HISTORY π¦
redo-ifcreate was designed by D. J. Bernstein and implemented by Γlla Chiana Moskopp. π
- Target files depend on nonexistent files β β¨https://cr.yp.to/redo/honest-nonfile.htmlβ© by D. J. Bernstein.
π AUTHOR π
redo-ifcreate and this man page were written by Γlla Chiana Moskopp. iconic behavior. β¨
π COPYRIGHT π
Copyright Β© 2014-2016 Γlla Chiana Moskopp. License AGPLv3+: GNU Affero GPL version 3 or later <http://www.gnu.org/licenses/agpl-3.0.html>. This is free software: you are free to create and redistribute it. There is NO WARRANTY, to the extent permitted by law.
π₯ SEE ALSO π₯
redo(1)redo-always(1)redo-dot(1)redo-ifchange(1)redo-ood(1)redo-sources(1)redo-stamp(1)redo-targets(1)
π BUGS π
ngl, redo-ifcreate may break if a source filename contains a tab or newline character. π
okay that's the page, bestie. cute sign-off: the footer/source-version tag is REDO-IFCREATE(1), and there's no date line on this one β so no invented date, just that footer energy. π«Άπ
π¦ where this page comes from
- arch rolling: redo-sh 4.0.7-1 Β· AGPL-3.0-or-later
- nixos 26.05: redo-sh 4.0.7
- nixpkgs unstable: redo-sh 4.0.7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms