diff options
author | Adrien Nader <adrien@notk.org> | 2015-02-08 18:16:42 +0100 |
---|---|---|
committer | Adrien Nader <adrien@notk.org> | 2015-02-08 18:16:42 +0100 |
commit | 8fd3507127ac683825ccba3d98ad3048525b2acc (patch) | |
tree | b142b3d9dc05e70f1abedae24c683f9c1f321690 /debugger/Makefile | |
parent | a5c4cb232c626346fa5fec957948869c1ee56753 (diff) |
ocamldoc/Makefile: don't "test -d" before "mkdir -p".
The following code:
if test -d foo; then : else mkdir -p foo; fi
amounts to the following:
if (i == 42) then { } else { i = 42 };
Instead, simply remove the test and always call "mkdir -p". The
opengroup website has the spec for "mkdir" at:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/mkdir.html
Quoting:
"The System V -p option was included to create any needed intermediate
directories and to complement the functionality provided by rmdir for
removing directories in the path prefix as they become empty. Because no
error is produced if any path component already exists, the -p option is
also useful to ensure that a particular directory exists."
This is exactly our usecase so just use "mkdir -p".
Diffstat (limited to 'debugger/Makefile')
0 files changed, 0 insertions, 0 deletions