Skip to content

Commit 716a27a

Browse files
Simplify logic on dir creation
1 parent 68d8cfb commit 716a27a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/JSON_to_workspace.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ function JSON_to_workspace() {
3333
"${ANALYSIS_NAME}/workspaces/${JSON_WORKSPACE}"
3434

3535
# Convert to ROOT + XML
36-
if [[ ! -d "${ANALYSIS_NAME}/xml" ]]; then
37-
mkdir "${ANALYSIS_NAME}/xml"
36+
if [[ -d "${ANALYSIS_NAME}/xml" ]]; then
37+
rm -rf "${ANALYSIS_NAME}/xml"
3838
fi
39-
rm -rf "${ANALYSIS_NAME}/xml"/*
39+
mkdir "${ANALYSIS_NAME}/xml"
4040
pyhf json2xml \
4141
--output-dir "${ANALYSIS_NAME}/xml" \
4242
"${ANALYSIS_NAME}/workspaces/${JSON_WORKSPACE}"

0 commit comments

Comments
 (0)