add additional ignores for example, template, tmpl extensions

refactor shell environment to pick up relative host and network directories via default (common parent with base)
master
David Kebler 2021-01-14 13:55:25 -08:00
parent fdd2f05198
commit d6dfa7753a
2 changed files with 14 additions and 3 deletions

View File

@ -2,6 +2,9 @@
# i.e. beginning with .
# no ignores here may begin with .
*.off
*.example
*.tmpl
*.template
*.md
*TODO*
*.log

View File

@ -60,7 +60,14 @@ export NETWORK_DOMAINS=(238.kebler.net 645.kebler.net 3115.kebler.net)
# network domain folder entry will be made for each domain set, first is home domain, others via vpn
if [[ $NETWORK_DOMAINS ]]; then
export NETWORK_HOME=${NETWORK_DOMAINS[0]}
export BASH_SHELL_NETWORK=/opt/bash/shell/network
# TODO needs to be automatically set not hard coded
declare parent
parent=$(dirname $BASH_SHELL_BASE)
export BASH_SHELL_NETWORK=$([[ -d $parent/network ]] && echo $parent/network || echo /opt/bash/shell/network)
# or comment above and set explictly
# export BASH_SHELL_NETWORK=<some directory>
declare domain
BASH_SHELL_NETWORK_DIRS=""
for domain in "${NETWORK_DOMAINS[@]}"; do
@ -70,8 +77,9 @@ fi
unset domain
export BASH_SHELL_NETWORK_DIRS
# will use $BASH_SHELL_HOST/<hostname> unless specifically set
export BASH_SHELL_HOST=/opt/bash/shell/host
export BASH_SHELL_HOST=$([[ -d $parent/host ]] && echo $parent/host || echo /opt/bash/shell/host)
# or comment above and set explictly
# export BASH_SHELL_HOST=<some directory>
# by default SHELL sources will be looked for under $HOME/bash/shell
# but can be user set below to $HOME/$BASH_SHELL_USER