conform scwrypts.scwrypts group definition to standard, required format; added short flag -c to make use more concise in quick non-scwrypts-runtime utility usage

This commit is contained in:
Wryn (yage) Wagner 2024-05-07 23:17:50 -06:00
parent 9288e6642b
commit f5ec9cff8c
4 changed files with 18 additions and 17 deletions

11
scwrypts.scwrypts.zsh Normal file
View File

@ -0,0 +1,11 @@
SCWRYPTS_GROUPS+=(scwrypts)
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
export SCWRYPTS_COLOR__scwrypts='\033[0;32m'
#export SCWRYPTS_TYPE__scwrypts=
#export SCWRYPTS_LIBRARY_ROOT__scwrypts=
export SCWRYPTS_VIRTUALENV_PATH__scwrypts="$SCWRYPTS_DATA_PATH/virtualenv"
export SCWRYPTS_PREFERRED_PYTHON_VERSIONS__scwrypts=(3.12 3.11 3.10)
export SCWRYPTS_NODE_VERSION__scwrypts=18.0.0

View File

@ -1,10 +0,0 @@
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
export SCWRYPTS_LIBRARY_ROOT__scwrypts="$SCWRYPTS_ROOT/zsh/lib"
export SCWRYPTS_COLOR__scwrypts='\033[0;32m'
export SCWRYPTS_VIRTUALENV_PATH__scwrypts="$SCWRYPTS_DATA_PATH/virtualenv"
[ ! -d "$SCWRYPTS_VIRTUALENV_PATH__scwrypts" ] && mkdir -p "$SCWRYPTS_VIRTUALENV_PATH__scwrypts"
export SCWRYPTS_PREFERRED_PYTHON_VERSIONS__scwrypts=(3.11 3.10 3.9)
export SCWRYPTS_NODE_VERSION__scwrypts=18.0.0

View File

@ -53,11 +53,11 @@ export \
SCWRYPTS_OUTPUT_PATH \ SCWRYPTS_OUTPUT_PATH \
; ;
SCWRYPTS_GROUPS=(scwrypts $(echo $SCWRYPTS_GROUPS | sed 's/\s\+/\n/g' | sort -u)) source "$SCWRYPTS_ROOT/scwrypts.scwrypts.zsh" \
source "$SCWRYPTS_ROOT/zsh/lib/config.group.zsh" \
|| FAIL 69 'failed to set up scwrypts group; aborting' || FAIL 69 'failed to set up scwrypts group; aborting'
SCWRYPTS_GROUPS=(scwrypts $(echo $SCWRYPTS_GROUPS | sed 's/\s\+/\n/g' | sort -u | grep -v '^scwrypts$'))
##################################################################### #####################################################################
for plugin in $(ls $SCWRYPTS_ROOT__scwrypts/plugins) for plugin in $(ls $SCWRYPTS_ROOT__scwrypts/plugins)

View File

@ -34,7 +34,7 @@ source "${0:a:h}/config.zsh"
use() { use() {
local SCWRYPTS_LIBRARY SCWRYPTS_LIBRARY_ROOT SCWRYPTS_LIBRARY_GROUP local SCWRYPTS_LIBRARY SCWRYPTS_LIBRARY_ROOT SCWRYPTS_LIBRARY_GROUP
local DEFER_ENVIRONMENT_CHECK=1 local DEFER_ENVIRONMENT_CHECK=true
while [[ $# -gt 0 ]] while [[ $# -gt 0 ]]
do do
@ -49,8 +49,8 @@ use() {
SCWRYPTS_LIBRARY_ROOT=$2 SCWRYPTS_LIBRARY_ROOT=$2
shift 1 shift 1
;; ;;
--check-environment ) -c | --check-environment )
DEFER_ENVIRONMENT_CHECK=0 DEFER_ENVIRONMENT_CHECK=false
;; ;;
* ) * )
[ ! $SCWRYPTS_LIBRARY ] \ [ ! $SCWRYPTS_LIBRARY ] \
@ -106,7 +106,7 @@ use() {
return 1 return 1
} }
[[ $DEFER_ENVIRONMENT_CHECK -eq 0 ]] && { [[ $DEFER_ENVIRONMENT_CHECK =~ false ]] && {
CHECK_ENVIRONMENT || { CHECK_ENVIRONMENT || {
((IMPORT_ERRORS+=1)) ((IMPORT_ERRORS+=1))
ERROR "import error for '$SCWRYPTS_LIBRARY_GROUP/$SCWRYPTS_LIBRARY'" ERROR "import error for '$SCWRYPTS_LIBRARY_GROUP/$SCWRYPTS_LIBRARY'"