scwrypts/zsh/scwrypts/configure
yage e8bb889789 v2.2.0
=====================================================================

--- New Scripts --------------------------

zsh )
  amazon EKS
   - aws/eks/login

--- Changes ------------------------------

- moved global .config to global/config.zsh
- moved various global configurations to global/

--- Bug Fixes ----------------------------

- REDIS_AUTH no longer required to attempt connection
- global configurations now propagate to non-zsh scripts
2022-08-09 13:18:41 -06:00

40 lines
1.3 KiB
Bash
Executable File

#!/bin/zsh
_DEPENDENCIES+=()
_REQUIRED_ENV+=()
source ${0:a:h}/common.zsh
#####################################################################
[ ! -f $SCWRYPTS_CONFIG_PATH/config ] && {
__STATUS 'first-time setup detected; creating local configuration override...'
touch $SCWRYPTS_CONFIG_PATH/config \
&& __SUCCESS 'created!' \
|| __FAIL 1 "unable to create config at '$SCWRYPTS_CONFIG_PATH/config'"
{
echo '#'
echo '# configuration for scwrypts'
echo '#'
sed -n '1d; /^###/q; p' $SCWRYPTS_ROOT/global/config.zsh | sed '$d'
} > $SCWRYPTS_CONFIG_PATH/config
__EDIT $SCWRYPTS_CONFIG_PATH/config
__STATUS 'attempting to build virtual environments'
__RUN_SCWRYPT zsh/scwrypts/virtualenv/update-all \
&& __SUCCESS 'finished updating virtualenvs' \
|| __WARNING 'unable to create one or more virtualenv (see above)' \
;
__REMINDER
__REMINDER 'use "zsh/scwrypts/virtualenv/update-all" to update environments'
__REMINDER '(equivalent to "npm install" or "pip install -r requirements.txt")'
__REMINDER
} || {
__STATUS 'opening local config for editing'
__EDIT $SCWRYPTS_CONFIG_PATH/config
__STATUS 'finished editing!'
}
__SUCCESS 'saved new configuration'
__REMINDER 'changes which affect the hot-key plugin will require a ZSHRC reload'