Relocated path helpers to be accessible earlier
This commit is contained in:
parent
5b8611d5d3
commit
422d8dc8a6
14
zsh/environment/host/devF/zshenv
Normal file
14
zsh/environment/host/devF/zshenv
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
export build_dir="/opt/build"
|
||||||
|
export apps_dir="/mount/data0/apps"
|
||||||
|
|
||||||
|
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"
|
||||||
|
done
|
|
@ -1,6 +1,6 @@
|
||||||
##### Aliases
|
##### Aliases
|
||||||
# Database Connection
|
|
||||||
db_envs=(cadev ildev indev ladev txdev utdev mddev)
|
db_envs=(cadev ildev indev ladev txdev utdev mddev)
|
||||||
|
# Database Connection
|
||||||
for env in $db_envs ; do
|
for env in $db_envs ; do
|
||||||
eval "alias psql_$env='psql -d $env -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U ${env}_owner'"
|
eval "alias psql_$env='psql -d $env -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U ${env}_owner'"
|
||||||
if (( $+commands[pgcli] )); then
|
if (( $+commands[pgcli] )); then
|
||||||
|
@ -12,17 +12,3 @@ done
|
||||||
alias psql_l="psql -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling -l"
|
alias psql_l="psql -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling -l"
|
||||||
# Sign-In as limited super user.
|
# Sign-In as limited super user.
|
||||||
alias psql_root="psql -d postgres -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling"
|
alias psql_root="psql -d postgres -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling"
|
||||||
|
|
||||||
##### Conveniences
|
|
||||||
#############################################################################################################
|
|
||||||
|
|
||||||
export build_dir="/opt/build"
|
|
||||||
export apps_dir="/mount/data0/apps"
|
|
||||||
|
|
||||||
for build_path in $build_dir/^shared ; do
|
|
||||||
# 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"
|
|
||||||
done
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user