Use "test -h" before "test -e" for items that might be dangling
symlinks since "test -e" returns false in that case.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
'--clean')
(
cd t/sampledata
'--clean')
(
cd t/sampledata
- if test -e b; then rm b; fi
- if test -e c; then rm c; fi
- if test -e etc; then rm etc; fi
+ # test -e is false for dangling symlinks.
+ if test -h b -o -e b; then rm b; fi
+ if test -h c -o -e c; then rm c; fi
+ if test -h etc -o -e etc; then rm etc; fi