Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > On Mon, Aug 30, 2010 at 09:50, Matthieu Moy <Matthieu.Moy@xxxxxxx> wrote: >> The same pattern is used in many tests, and makes it easy for new ones to >> rely on $HOME being a trashable, clean, directory. > > Looks good, but why not: > >> +HOME=$(pwd) >> +export HOME > > This instead: > > HOME=$TRASH_DIRECTORY > export HOME > > Looks like it might be more correct given this (always an absolute > path), but I haven't tested: That should work too, but with your version, I have to think harder to make sure $TRASH_DIRECTORY is absolute (that should be OK), and won't make any issue with symlinks (I have no idea whether it is OK or not), while it's trivially correct with mine (pwd is absolute, and the -P option of the cd command right above prevents issue with symlinks). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html