yage
6333a2f6b8
===================================================================== --- New Scripts -------------------------- zsh ) vundle-vim helpers - vim/vundle/edit-build-actions - vim/vundle/install - vim/vundle/rebuild quick install-from-source scripts - git/package/install - git/package/build (install --only-build) - git/package/download (install --only-pull) - git/package/update (install --update) config sym-linker (for source-controlled .configs) - config/update (symlinks + terminfo) - config/symlinks (set all symlinks from settings) - config/settings (edit settings which aren't scwrypts env variables) - config/terminfo (load all terminfo from settings) --- Changes ------------------------------ - helper comments are now inserted in all env files - removed underscore prefix for standard AWS environment variables - added "opening" and "finished editing" comments to __EDIT util - added __USAGE to format $USAGE variable to std:err - added __ERROR_CHECK to exit if any __ERROR(s) were called
41 lines
1.1 KiB
Bash
41 lines
1.1 KiB
Bash
#####################################################################
|
|
|
|
_DEPENDENCIES+=(fzf) # (extensible) list of PATH dependencies
|
|
_REQUIRED_ENV+=() # (extensible) list of required environment variables
|
|
|
|
#####################################################################
|
|
|
|
source ${0:a:h}/colors.zsh
|
|
source ${0:a:h}/io.zsh
|
|
source ${0:a:h}/os.zsh
|
|
source ${0:a:h}/credits.zsh
|
|
|
|
#####################################################################
|
|
|
|
IMPORT_ERROR=0
|
|
|
|
source ${0:a:h}/dependencies.zsh
|
|
_DEP_ERROR=0
|
|
_DEPENDENCIES=($(echo $_DEPENDENCIES | sort -u))
|
|
__CHECK_DEPENDENCIES $_DEPENDENCIES || _DEP_ERROR=$?
|
|
|
|
source ${0:a:h}/environment.zsh
|
|
_ENV_ERROR=0
|
|
_REQUIRED_ENV=($(echo $_REQUIRED_ENV | sort -u))
|
|
__CHECK_REQUIRED_ENV $_REQUIRED_ENV || _ENV_ERROR=$?
|
|
|
|
[[ $_ENV_ERROR -ne 0 ]] && {
|
|
__REMINDER 'to update missing environment variables, run:'
|
|
__REMINDER "'scwrypts zsh/scwrypts/environment/edit'"
|
|
}
|
|
|
|
((IMPORT_ERROR+=$_DEP_ERROR))
|
|
((IMPORT_ERROR+=$_ENV_ERROR))
|
|
|
|
[[ $IMPORT_ERROR -ne 0 ]] && {
|
|
__ERROR "encountered $IMPORT_ERROR import error(s)"
|
|
}
|
|
|
|
#####################################################################
|
|
[[ $IMPORT_ERROR -eq 0 ]]
|