From 55924c472ef03a4fe6d7f6be4a2153924c818193 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 9 Aug 2024 11:13:56 -0400 Subject: [PATCH] Added some qoute safety --- zsh/environment/host/devF/zshenv | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/zsh/environment/host/devF/zshenv b/zsh/environment/host/devF/zshenv index c5f773d..d75014b 100644 --- a/zsh/environment/host/devF/zshenv +++ b/zsh/environment/host/devF/zshenv @@ -1,15 +1,17 @@ +#!/usr/bin/env zsh +# vim: syn=zsh export build_dir="/opt/build" export apps_dir="/mount/data0/apps" export PGHOST="dev.cpmixkhfrend.us-east-1.rds.amazonaws.com" -for build_path in $build_dir/* ; do +for build_path in "$build_dir"/* ; do if [[ $build_path =~ "shared" ]]; then continue; fi # get the env name from the full path. - local env_name=$(basename $build_path ) - eval "export ${env_name}_build=${build_path}" - eval "export ${env_name}_app=${apps_dir}/${env_name}" - eval "export ${env_name}_logs=${apps_dir}/${env_name}/logs" + local env_name=$(basename "$build_path" ) + eval "export '${env_name}_build=${build_path}'" + eval "export '${env_name}_app=${apps_dir}/${env_name}'" + eval "export '${env_name}_logs=${apps_dir}/${env_name}/logs'" done