Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: adding mkdir to _store_cache



    Hi Felix :)

>> "mkdir -p" is not universally supported.
>I thought modern versions of *nix had the "-p" flag.

    The Single Unix Specification v3 specify it, and GNU fileutils
(version 4.1, which is what I have) supports it.

>Is there something that is portable?

    Well, you can use parameter expansion and use the '##' and '%%'
expansions for getting each component of the path and make
directories simulating '-p', but IMHO it doesn't worth the effort.

>Basically that code was copied from the existing code, we already
>do a "-p" to create the cache directory if it doesn't exist.  
>So that needs to be fixed also.

    Autoconf uses '-p' too, if I remember well :? Anyway, if you want
to make something portable, you must assume that you cannot do it
*universally* portable. Just make it portable among 'current
practice unixes'. IMHO it doesn't make sense to make a thing work for
a couple of systems in a difficult way just for not using a feature
that the rest 98% systems have O:))
 
    Raúl



Messages sorted by: Reverse Date, Date, Thread, Author