2022-05-24 16:26:05 +00:00
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
_DEPENDENCIES+=(fzf) # (extensible) list of PATH dependencies
|
|
|
|
_REQUIRED_ENV+=() # (extensible) list of required environment variables
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
2022-07-02 02:57:03 +00:00
|
|
|
source ${0:a:h}/colors.zsh
|
2022-05-24 16:26:05 +00:00
|
|
|
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
|
2022-06-22 18:17:19 +00:00
|
|
|
_DEP_ERROR=0
|
2022-05-24 16:26:05 +00:00
|
|
|
_DEPENDENCIES=($(echo $_DEPENDENCIES | sort -u))
|
2022-06-22 18:17:19 +00:00
|
|
|
__CHECK_DEPENDENCIES $_DEPENDENCIES || _DEP_ERROR=$?
|
2022-05-24 16:26:05 +00:00
|
|
|
|
|
|
|
source ${0:a:h}/environment.zsh
|
2022-06-22 18:17:19 +00:00
|
|
|
_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))
|
2022-05-24 16:26:05 +00:00
|
|
|
|
2022-06-22 18:17:19 +00:00
|
|
|
[[ $IMPORT_ERROR -ne 0 ]] && {
|
2022-05-24 16:26:05 +00:00
|
|
|
__ERROR "encountered $IMPORT_ERROR import error(s)"
|
|
|
|
}
|
|
|
|
|
|
|
|
#####################################################################
|
2022-06-22 18:17:19 +00:00
|
|
|
[[ $IMPORT_ERROR -eq 0 ]]
|