Added some qoute safety

This commit is contained in:
James Patrick 2024-08-09 11:13:56 -04:00
parent c2fb2573be
commit 55924c472e
No known key found for this signature in database

View File

@ -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