From 6bf6b60da870cfeeecb68e679cbb125c67296e2e Mon Sep 17 00:00:00 2001
From: Martin Schroschk <martin.schroschk@tu-dresden.de>
Date: Wed, 31 Aug 2022 13:20:05 +0200
Subject: [PATCH] Encapsulate variables in curly braces

---
 .../docs/data_lifecycle/workspaces.md                | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md b/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md
index 2789fdfb2..39e9453ab 100644
--- a/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md
+++ b/doc.zih.tu-dresden.de/docs/data_lifecycle/workspaces.md
@@ -244,8 +244,8 @@ calling the actual software to do your computation).
     test ! -f "${INPUTFILE}" && echo "Error: Could not find the input file ${INPUTFILE}" && exit 1
 
     COMPUTE_DIR=computation_$SLURM_JOB_ID
-    export WORKSPACE_DIR=$(ws_allocate -F ssd $COMPUTE_DIR 7)
-    echo $WORKSPACE_DIR
+    export WORKSPACE_DIR=$(ws_allocate -F ssd ${COMPUTE_DIR} 7)
+    echo ${WORKSPACE_DIR}
 
     # Check allocation.
     test -z "${WORKSPACE_DIR}" && echo "Error: Cannot allocate workspace ${COMPUTE_DIR}" && exit 1
@@ -258,12 +258,12 @@ calling the actual software to do your computation).
     # Compress results with bzip2 (which includes CRC32 Checksums)
     bzip2 --compress --stdout -4 "${WORKSPACE_DIR}" > $HOME/gaussian_job-$SLURM_JOB_ID.bz2
     RETURN_CODE=$?
-    COMPRESSION_SUCCESS="$(if test $RETURN_CODE -eq 0; then echo 'TRUE'; else echo 'FALSE'; fi)"
+    COMPRESSION_SUCCESS="$(if test ${RETURN_CODE} -eq 0; then echo 'TRUE'; else echo 'FALSE'; fi)"
 
-    if [ "TRUE" = $COMPRESSION_SUCCESS ]; then
-        test -d $WORKSPACE_DIR && rm -rf $WORKSPACE_DIR/*
+    if [ "TRUE" = ${COMPRESSION_SUCCESS} ]; then
+        test -d ${WORKSPACE_DIR} && rm -rf ${WORKSPACE_DIR}/*
         # Reduces grace period to 1 day!
-        ws_release -F ssd $COMPUTE_DIR
+        ws_release -F ssd ${COMPUTE_DIR}
     else
         echo "Error with compression and writing of results";
         echo "Please check the folder \"${WORKSPACE_DIR}\" for any partial(?) results.";
-- 
GitLab