Skip to contentSkip to conversation

mg-execute-flight: create tmp directory if it doesn't exist

PATCH In review Wei Liu 3 participants 3 messages Dec 7, 2015

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 mg-execute-flight: create tmp directory if it doesn't exist

---
 mg-execute-flight | 2 ++
 1 file changed, 2 insertions(+)
mg-execute-flight +2 -0
index 8b2c21c..dd64aef 100755
@@ -66,6 +66,8 @@ export OSSTEST_RESOURCE_PREINFO="[adhoc $blessing]\
 
 : ${OSSTEST_HTMLPUB_DIR:=`getconfig Logs`}
 
+if [ ! -d tmp ]; then mkdir tmp; fi
+
 (./sg-execute-flight $flight $blessing ||
  echo "sg-execute-flight $flight $blessing failed: $?") \
  >tmp/$flight.transcript 2>&1
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Wei Liu

Most other places just do "mkdir -p tmp" (-p includes "no error if existing"). I guess it doesn't really matter either way.

Ian.

Quoted 14 lines

---
 mg-execute-flight | 2 ++

 1 file changed, 2 insertions(+)
mg-execute-flight +0 -0
index 8b2c21c..dd64aef 100755
@@ -66,6 +66,8 @@ export OSSTEST_RESOURCE_PREINFO="[adhoc $blessing]\


 : ${OSSTEST_HTMLPUB_DIR:=getconfig Logs}

mg-execute-flight +2 -0
+if [ ! -d tmp ]; then mkdir tmp; fi
+
Quoted 3 lines

 (./sg-execute-flight $flight $blessing ||
  echo "sg-execute-flight $flight $blessing failed: $?") \
  >tmp/$flight.transcript 2>&1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw

Ian Campbell writes ("Re: [PATCH OSSTEST] mg-execute-flight: create tmp directory if it doesn't exist"):

Quoted 7 lines · Wei Liu
Quoted 1 line

Most other places just do "mkdir -p tmp" (-p includes "no error if existing"). I guess it doesn't really matter either way.

mkdir -p is better IMO because it's simpler...

Ian.