Browse Source

Fix many derps

bryan 2 years ago
parent
commit
383c2946ef
1 changed files with 16 additions and 16 deletions
  1. 16 16
      run-with-podman.sh

+ 16 - 16
run-with-podman.sh

@@ -102,7 +102,7 @@ function parse_input () {
 parse_input "${@}"
 
 # Sanitize filename for unique container name
-CLEAN="${FILE_ACTIVE//_/}" && CLEAN="${CLEAN// /_}" &&
+CLEAN="${FILE_ACTIVE//_/}" && CLEAN="${CLEAN// /}" &&
 CLEAN="${CLEAN//[^a-zA-Z0-9_]/}" && CLEAN="${CLEAN,,}"
 
 # Allow container access to the pwd
@@ -140,27 +140,27 @@ elif [[ $MODE == "1" ]]; then
     if podman container exists "atom-${CLEAN}-persistent"; then
         echo "Using existing container!"
         podman exec "atom-${CLEAN}-persistent" \
-        /bin/bash -c "chmod 755 {FILE_ACTIVE} && {FILE_ACTIVE}"
+        /bin/bash -c "chmod 755 ${FILE_ACTIVE} && ${FILE_ACTIVE}"
     else
         if [[ -n $MASK_DIR ]]; then
             podman run \
             -it \
             --systemd="${SYSTEMD}" \
             --name "atom-${CLEAN}-persistent" \
-            -v "{FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}" \
-            -v "{FILE_ACTIVE_PATH}/${MASK_DIR}" \
-            -w "{FILE_ACTIVE_PATH}" \
+            -v "${FILE_ACTIVE_PATH}:${FILE_ACTIVE_PATH}" \
+            -v "${FILE_ACTIVE_PATH}/${MASK_DIR}" \
+            -w "${FILE_ACTIVE_PATH}" \
             "${IMAGE}" \
-            /bin/bash -c "chmod 755 {FILE_ACTIVE} && {FILE_ACTIVE} ${OPTIONS}"
+            /bin/bash -c "chmod 755 ${FILE_ACTIVE} && ${FILE_ACTIVE} ${OPTIONS}"
         else
             podman run \
             -it \
             --systemd="${SYSTEMD}" \
             --name "atom-${CLEAN}-persistent" \
-            -v "{FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}" \
-            -w "{FILE_ACTIVE_PATH}" \
+            -v "${FILE_ACTIVE_PATH}:${FILE_ACTIVE_PATH}" \
+            -w "${FILE_ACTIVE_PATH}" \
             "${IMAGE}" \
-            /bin/bash -c "chmod 755 {FILE_ACTIVE} && {FILE_ACTIVE} ${OPTIONS}"
+            /bin/bash -c "chmod 755 ${FILE_ACTIVE} && ${FILE_ACTIVE} ${OPTIONS}"
         fi
     fi
 # Recreate persistent container
@@ -175,19 +175,19 @@ elif [[ $MODE == "2" ]]; then
         -it \
         --systemd="${SYSTEMD}" \
         --name "atom-${CLEAN}-persistent" \
-        -v "{FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}" \
-        -v "{FILE_ACTIVE_PATH}/${MASK_DIR}" \
-        -w "{FILE_ACTIVE_PATH}" \
+        -v "${FILE_ACTIVE_PATH}:${FILE_ACTIVE_PATH}" \
+        -v "${FILE_ACTIVE_PATH}/${MASK_DIR}" \
+        -w "${FILE_ACTIVE_PATH}" \
         "${IMAGE}" \
-        /bin/bash -c "chmod 755 {FILE_ACTIVE} && {FILE_ACTIVE} ${OPTIONS}"
+        /bin/bash -c "chmod 755 ${FILE_ACTIVE} && ${FILE_ACTIVE} ${OPTIONS}"
     else
         podman run \
         -it \
         --systemd="${SYSTEMD}" \
         --name "atom-${CLEAN}-persistent" \
-        -v "{FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}" \
-        -w "{FILE_ACTIVE_PATH}" \
+        -v "${FILE_ACTIVE_PATH}:${FILE_ACTIVE_PATH}" \
+        -w "${FILE_ACTIVE_PATH}" \
         "${IMAGE}" \
-        /bin/bash -c "chmod 755 {FILE_ACTIVE} && {FILE_ACTIVE} ${OPTIONS}"
+        /bin/bash -c "chmod 755 ${FILE_ACTIVE} && ${FILE_ACTIVE} ${OPTIONS}"
     fi
 fi