File tree 7 files changed +14
-14
lines changed
7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ usage() {
24
24
}
25
25
26
26
mydir=$( dirname " $0 " )
27
- cd " $( /bin/ pwd) " && cd " $mydir " || die " can't find self in dir: $mydir "
27
+ cd " $( env pwd) " && cd " $mydir " || die " can't find self in dir: $mydir "
28
28
29
29
args=
30
30
while [ " $1 " != " ${1# -} " ]; do
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ qdirname() (
54
54
)
55
55
56
56
_dirsplit " $0 "
57
- REDO=$( cd " $( pwd -P) " &&
57
+ REDO=$( cd " $( env pwd -P) " &&
58
58
cd " ${_dirsplit_dir:- .} " &&
59
59
echo " $PWD /$_dirsplit_base " )
60
60
export REDO
@@ -89,7 +89,7 @@ if [ -z "$DO_BUILT" -a "$_cmd" != "redo-whichdo" ]; then
89
89
if [ " $# " -eq 0 ] && [ " $_cmd " = " do" -o " $_cmd " = " redo" ]; then
90
90
set all # only toplevel redo has a default target
91
91
fi
92
- export DO_STARTDIR=" $( pwd -P) "
92
+ export DO_STARTDIR=" $( env pwd -P) "
93
93
# If starting /bin/pwd != $PWD, this will fix it.
94
94
# That can happen when $PWD contains symlinks that the shell is
95
95
# trying helpfully (but unsuccessfully) to hide from the user.
@@ -228,7 +228,7 @@ _realpath()
228
228
# echo "Trying: $PWD--$path" >&2
229
229
if cd -P " $path " 2> /dev/null; then
230
230
# success
231
- pwd=$( pwd -P)
231
+ pwd=$( env pwd -P)
232
232
# echo " chdir ok: $pwd--$rest" >&2
233
233
np=$( _normpath " ${pwd%/ } /$rest " " $relto " )
234
234
if [ -n " $isabs " ]; then
Original file line number Diff line number Diff line change @@ -136,9 +136,9 @@ mkdir y
136
136
ln -s . y/x
137
137
check " /usr/__does_not/b" _realpath " /usr/__does_not/a/../b" " $x "
138
138
check " foo" _realpath " y/x/x/x/x/x/../foo" " $PWD "
139
- check " $( /bin/ pwd) /foo" _realpath " $PWD /y/x/x/x/x/x/../foo" " $PWD "
139
+ check " $( env pwd) /foo" _realpath " $PWD /y/x/x/x/x/x/../foo" " $PWD "
140
140
check " foo/blam" _realpath " y/x/x/x/x/x/../foo/spam/../blam" " $PWD "
141
- check " $( /bin/ pwd) /foo/blam" _realpath " $PWD /y/x/x/../foo/spam/../blam" " $PWD "
141
+ check " $( env pwd) /foo/blam" _realpath " $PWD /y/x/x/../foo/spam/../blam" " $PWD "
142
142
143
143
144
144
SECTION _find_dofile
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ for iter in 10 20; do
14
14
cd y/x/x/x/x/x
15
15
IFS= $(printf '\n')
16
16
redo- ifchange static x/x/x/static $PWD/static \
17
- $(/bin/ pwd)/static /etc/passwd
17
+ $(env pwd)/static /etc/passwd
18
18
redo- ifchange $PWD/../static 2> /dev/null && exit 35
19
19
redo- ifchange 1.dyn x/x/x/2.dyn $PWD/3.dyn \
20
- $PWD/../4.dyn $(/bin/ pwd)/ 5.dyn
20
+ $PWD/../4.dyn $(env pwd)/ 5.dyn
21
21
)
22
22
[ - e y/1.dyn ] || exit $((iter + 1))
23
23
[ - e y/2.dyn ] || exit $((iter + 2))
Original file line number Diff line number Diff line change 10
10
11
11
# builds 1xx* /all to test for basic/dangerous functionality.
12
12
# We don't want to run more advanced tests if the basics don't work.
13
- /bin/ ls 1[0- 9][0- 9]* /all.do |
13
+ ls 1[0- 9][0- 9]* /all.do |
14
14
sed 's/\.do$//' |
15
15
xargs redo
16
16
110- compile/hello > & 2
17
17
18
18
# builds most of the rest in parallel
19
- /bin/ ls [2- 9][0- 9][0- 9]* /all.do |
19
+ ls [2- 9][0- 9][0- 9]* /all.do |
20
20
sed 's/\.do$//' |
21
21
xargs redo
22
22
@@ -25,7 +25,7 @@ xargs redo
25
25
# are checking for unnecessary extra rebuilds of some targets, which
26
26
# might happen after flush- cache.
27
27
# FIXME: a better solution might be to make flush- cache less destructive!
28
- /bin/ ls [s][0- 9][0- 9]* /all.do |
28
+ ls [s][0- 9][0- 9]* /all.do |
29
29
sed 's/\.do$//' | {
30
30
while read d; do
31
31
redo " $d"
Original file line number Diff line number Diff line change 1
- /bin/ ls [0- 9s][0- 9][0- 9]* /clean.do |
1
+ ls [0- 9s][0- 9][0- 9]* /clean.do |
2
2
sed 's/\.do$//' |
3
3
xargs redo
4
4
Original file line number Diff line number Diff line change @@ -526,8 +526,8 @@ rm -f shlink ../shlink
526
526
ln -s . shlink
527
527
(quiet_stderr cd -L shlink/shlink/shlink/../shlink) || fail 120
528
528
(quiet_stderr cd -P shlink/shlink/shlink/../shlink) && fail 121
529
- x1=$(cd shlink && basename "$(pwd -P)")
530
- x2=$(cd shlink && basename "$(pwd -L)")
529
+ x1=$(cd shlink && basename "$(env pwd -P)")
530
+ x2=$(cd shlink && basename "$(env pwd -L)")
531
531
[ "$x1" = "t" ] || fail 122
532
532
[ "$x2" = "shlink" ] || fail 123
533
533
You can’t perform that action at this time.
0 commit comments