Avoid bashism >&file
The >& form is only for file descriptors, passing a file name there is
a bash extension.
$ /bin/dash -c 'echo foo >&/dev/null'
/bin/dash: 1: Syntax error: Bad fd number
This commit is contained in:
parent
5156feae9d
commit
c2c013970e
4 changed files with 8 additions and 8 deletions
|
|
@ -1,14 +1,14 @@
|
|||
rm -f this-doesnt-exist
|
||||
! redo this-doesnt-exist >&/dev/null || exit 32 # expected to fail
|
||||
! redo-ifchange this-doesnt-exist >&/dev/null || exit 33 # expected to fail
|
||||
redo-ifcreate this-doesnt-exist >&/dev/null || exit 34 # expected to pass
|
||||
! redo this-doesnt-exist >/dev/null 2>&1 || exit 32 # expected to fail
|
||||
! redo-ifchange this-doesnt-exist >/dev/null 2>&1 || exit 33 # expected to fail
|
||||
redo-ifcreate this-doesnt-exist >/dev/null 2>&1 || exit 34 # expected to pass
|
||||
|
||||
|
||||
|
||||
rm -f fail
|
||||
! redo-ifchange fail >&/dev/null || exit 44 # expected to fail
|
||||
! redo-ifchange fail >/dev/null 2>&1 || exit 44 # expected to fail
|
||||
|
||||
touch fail
|
||||
../flush-cache
|
||||
# since we created this file by hand, fail.do won't run, so it won't fail.
|
||||
redo-ifchange fail >&/dev/null || exit 55 # expected to pass
|
||||
redo-ifchange fail >/dev/null 2>&1 || exit 55 # expected to pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue