* why bother with 'cd .' ?
@ 1999-06-01 4:52 Timothy J Luoma
1999-06-01 5:42 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Timothy J Luoma @ 1999-06-01 4:52 UTC (permalink / raw)
To: zsh-workers
This seemed to confuse my /bin/sh:
cd . && \
CONFIG_FILES= CONFIG_HEADERS=./config.h ./config.status
/bin/sh: .: bad directory
(now I can't tell you why it confused /bin/sh, sometimes it seems to work
and other times it gives that error)
could we have something like
if [ "$PWD" != "$SRC_DIR" ]
cd $SRC_DIR
fi
(using whatever the proper variables are)
It just seems like an unnecessary step which for some reason can cause confusion
TjL
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: why bother with 'cd .' ?
1999-06-01 4:52 why bother with 'cd .' ? Timothy J Luoma
@ 1999-06-01 5:42 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-06-01 5:42 UTC (permalink / raw)
To: Timothy J Luoma, zsh-workers
On Jun 1, 12:52am, Timothy J Luoma wrote:
} Subject: why bother with 'cd .' ?
}
} cd . && \
} CONFIG_FILES= CONFIG_HEADERS=./config.h ./config.status
} /bin/sh: .: bad directory
There are two cases in which I've ever seen a problem like that. First
is when I've had two shells running, and in one shell removed the current
working directory of the other shell. The second is when the current
working directory is on an NFS filesystem that is "soft" mounted, and
the NFS server is having trouble (too heavily loaded, perhaps).
If you're seeing this intermittently in otherwise ordinary directories,
I suggest you get your filesystem fsck'd soon.
} could we have something like
}
} if [ "$PWD" != "$SRC_DIR" ]
}
} cd $SRC_DIR
} fi
It's $(dir_top), and the test would have to be [ $(dir_top) != . ], but
if you can't "cd ." then "./config.status" isn't likely to work either.
The whole point of using variables like $(dir_top) is so that the command
to be run doesn't need to care about the variable's value.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-06-01 5:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-01 4:52 why bother with 'cd .' ? Timothy J Luoma
1999-06-01 5:42 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).