2 # Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
9 # On some systems, the -p option to mkdir (= also create any missing parent
10 # directories) is not available.
14 foreach $arg (@ARGV) {
23 $dir =~ s|/*\Z(?!\n)||s;
29 if ($dir =~ m|[^/]/|s) {
30 local($parent) = $dir;
31 $parent =~ s|[^/]*\Z(?!\n)||s;
36 unless (mkdir($dir, 0777)) {
38 # We raced against another instance doing the same thing.
41 die "Cannot create directory $dir: $!\n";
43 print "created directory `$dir'\n";