minimal/do: less aggressive 'all' default; add fake redo-{sources,targets,ood}.
If redo-ifchange is a symlink to minimal/do, and we run it from *outside* an existing session, it shouldn't default to 'all'. redo-sources, redo-targets, and redo-ood aren't too useful with minimal/do, but they should exist in case someone tries to use them, so just symlink them to /bin/true, like we do with redo-ifcreate.
This commit is contained in:
parent
a14aa4c86d
commit
25d24d117f
1 changed files with 5 additions and 2 deletions
|
|
@ -72,7 +72,9 @@ _debug() {
|
||||||
|
|
||||||
if [ -z "$DO_BUILT" -a "$_cmd" != "redo-whichdo" ]; then
|
if [ -z "$DO_BUILT" -a "$_cmd" != "redo-whichdo" ]; then
|
||||||
DO_TOP=1
|
DO_TOP=1
|
||||||
[ "$#" -gt 0 ] || set all # only toplevel redo has a default target
|
if [ "$#" -eq 0 ] && [ "$_cmd" = "do" -o "$_cmd" = "redo" ]; then
|
||||||
|
set all # only toplevel redo has a default target
|
||||||
|
fi
|
||||||
export DO_BUILT=$PWD/.do_built
|
export DO_BUILT=$PWD/.do_built
|
||||||
: >>"$DO_BUILT"
|
: >>"$DO_BUILT"
|
||||||
sort -u "$DO_BUILT" >"$DO_BUILT.new"
|
sort -u "$DO_BUILT" >"$DO_BUILT.new"
|
||||||
|
|
@ -90,7 +92,8 @@ if [ -z "$DO_BUILT" -a "$_cmd" != "redo-whichdo" ]; then
|
||||||
ln -s "$REDO" "$DO_PATH/$d"
|
ln -s "$REDO" "$DO_PATH/$d"
|
||||||
done
|
done
|
||||||
[ -e /bin/true ] && TRUE=/bin/true || TRUE=/usr/bin/true
|
[ -e /bin/true ] && TRUE=/bin/true || TRUE=/usr/bin/true
|
||||||
for d in redo-ifcreate redo-stamp redo-always; do
|
for d in redo-ifcreate redo-stamp redo-always redo-ood \
|
||||||
|
redo-targets redo-sources; do
|
||||||
ln -s $TRUE "$DO_PATH/$d"
|
ln -s $TRUE "$DO_PATH/$d"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue