MacOS: "-e filename/." returns true even for non-directories.
This has something to do with resource forks. So use "-d filename/." instead, which returns false if filename is not a directory.
This commit is contained in:
parent
97eea66830
commit
c1a1f32445
5 changed files with 8 additions and 3 deletions
|
|
@ -99,7 +99,7 @@ _do()
|
|||
{
|
||||
DIR=$1
|
||||
TARGET=$2
|
||||
if [ ! -e "$TARGET" ] || [ -e "$TARGET/." -a ! -e "$TARGET.did" ]; then
|
||||
if [ ! -e "$TARGET" ] || [ -d "$TARGET/." -a ! -e "$TARGET.did" ]; then
|
||||
printf '%sdo %s%s%s%s\n' \
|
||||
"$GREEN" "$DO_DEPTH" "$BOLD" "$DIR$TARGET" "$PLAIN" >&2
|
||||
echo "$PWD/$TARGET" >>"$DO_BUILT"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue