yage
96992e9344
===================================================================== --- New Scripts -------------------------- zsh ) latex + latex template engine - latex/build-pdf - latex/cleanup - latex/create-new - latex/get-pdf - latex/open-pdf beta SQL script -- got tired of floating this; works, but only OK - db/run-sql/postgres --- Changes ------------------------------ - Added 'math', 'basic', and 'times-new-roman' templates to latex - Added 'readlink' to list of required coreutils - Added __INPUT to read into a variable with prompt (zsh/utils/io) - Added $EXECUTION_DIR to interact with the user's working directory --- Bug Fixes ---------------------------- - subscwrypts no longer force stdout/stderr to tty
43 lines
1.1 KiB
Bash
43 lines
1.1 KiB
Bash
#####################################################################
|
|
|
|
[ ! $SCWRYPTS_ROOT ] && SCWRYPTS_ROOT="$(dirname ${0:a:h})"
|
|
|
|
source "${0:a:h}/config.zsh"
|
|
|
|
#####################################################################
|
|
|
|
__SCWRYPT=1 # arbitrary; indicates scwrypts exists
|
|
|
|
__PREFERRED_PYTHON_VERSIONS=(3.10 3.9)
|
|
__NODE_VERSION=18.0.0
|
|
|
|
__ENV_TEMPLATE=$SCWRYPTS_ROOT/.env.template
|
|
|
|
#####################################################################
|
|
|
|
__GET_PATH_TO_RELATIVE_ARGUMENT() {
|
|
[[ $1 =~ ^[.] ]] \
|
|
&& echo $(readlink -f "$EXECUTION_DIR/$1") \
|
|
|| echo "$1" \
|
|
;
|
|
true
|
|
}
|
|
|
|
#####################################################################
|
|
|
|
__RUN_SCWRYPT() {
|
|
((SUBSCWRYPT+=1))
|
|
{ printf ' '; printf '--%.0s' {1..$SUBSCWRYPT}; printf " ($SUBSCWRYPT) "; } >&2
|
|
echo " BEGIN SUBSCWRYPT : $(basename $1)" >&2
|
|
|
|
SUBSCWRYPT=$SUBSCWRYPT SCWRYPTS_ENV=$ENV_NAME \
|
|
"$SCWRYPTS_ROOT/scwrypts" $@
|
|
EXIT_CODE=$?
|
|
|
|
{ printf ' '; printf '--%.0s' {1..$SUBSCWRYPT}; printf " ($SUBSCWRYPT) "; } >&2
|
|
echo " END SUBSCWRYPT : $(basename $1)" >&2
|
|
((SUBSCWRYPT-=1))
|
|
|
|
return $EXIT_CODE
|
|
}
|