IMO the solution using
abspath=$(cd $dir;pwd)
to get the absolute path of dir does not work. When calling fai dirinstall
relpath
the user will specify a relative path that does not exist yet. So the
cd will not work.
Also using readlink -f will not help when the relative path does not
exist.
Hi,
On Thursday 02 November 2006 15:10, Thomas Lange wrote:
IMO it's better to force the user to specify an absolute path
and to print a good error message in case he specifies a relative path.
why is it better to force someone to behave like the programm wants, instead
of making the programm
On Thu, 2 Nov 2006 16:49:36 +0100, Holger Levsen [EMAIL PROTECTED] said:
If the directory doesn't exist, create it. Doesnt matter if the path is
relative or absolute.
Sure this directory will be created. But it does matter in this case
if it's relative or absolute. That's the bug.
--
On Thu, 2 Nov 2006 16:49:36 +0100, Holger Levsen [EMAIL PROTECTED]
said:
If the directory doesn't exist, create it. Doesnt matter if the path is
relative or absolute.
Sure this directory will be created. But it does matter in this case
if it's relative or absolute. That's the
Would it be OK to check if the path for dirinstall is an absolute
path? If not, fai could print an error message.
Or should fai convert a relative path to an absolute one?
--
regards Thomas
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL
Would it be OK to check if the path for dirinstall is an absolute
path? If not, fai could print an error message.
Or should fai convert a relative path to an absolute one?
In my opinion fai should definitely accept a relative path; the patch I supplied
is supposed to make fai deal with
Thomas Lange wrote:
Currently I do not remobmer which function returns the canonical
path. How can I convert a relativ path to an absolute path?
[...]
What about readlink -f bla ? It's not bash-builtin but included in coreutils, so
it should be fine.
HTH,
Michael
pgpTa46ZxhxDB.pgp
Currently I do not remobmer which function returns the canonical
path. How can I convert a relativ path to an absolute path?
--
regards Thomas
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Thomas Lange wrote:
Currently I do not remobmer which function returns the canonical
path. How can I convert a relativ path to an absolute path?
Because there's nothing to remember :) In BASH, there's no builtin
function to to that.
I did that not so long ago but somehow don't remember it now
9 matches
Mail list logo