]> xenbits.xensource.com Git - osstest.git/commitdiff
standalone: Use mkdir -p
authorIan Jackson <iwj@xenproject.org>
Thu, 1 Oct 2020 14:18:33 +0000 (15:18 +0100)
committerIan Jackson <iwj@xenproject.org>
Thu, 1 Oct 2020 15:43:56 +0000 (16:43 +0100)
These two mkdir calls could fail if
standalone-generate-dump-flight-runvars is run without a log
directory, because they were not concurrency-correct.

mkdir -p should fix that.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
standalone

index 9553d6c926839a4cdb886340897b64b224b7517f..4d1f3513e77f70f45dc2cd55978c718ac616d26b 100755 (executable)
@@ -181,12 +181,8 @@ check_repos() {
 }
 
 ensure_logs() {
-    if [ ! -d "logs" ] ; then
-       mkdir "logs"
-    fi
-    if [ ! -d "logs/$flight" ] ; then
-       mkdir "logs/$flight"
-    fi
+    mkdir -p "logs"
+    mkdir -p "logs/$flight"
 }
 
 with_logging() {