The idea is to make bash more userfriendly an sharing lib's between multiple scripts instead of copy/paste or manual sourcing.
- Download the repository and put bin/ufb.sh inside anywhere in $PATH
- cp libs/* inside /usr/share/ufb
- Create a new shelscript and as shebang use the ufb.sh
- That's pretty all, now you can simply import libs's etc..
MAke more libs and a whole documentation of core libs.
The function doc
USAGE: .isDigit NUMBER Check if the given string is a digit
USAGE: .matchString STRING1 STRING2 Check if string1 match string2
USAGE: .matchRegex STRING REGEX Check if string match regex
USAGE: .isEmpty STRING Check if string is empty
USAGE: .inArray referenceArray STRING Check if string is in array
USAGE: .trim referenceVariable Trim the referenceVariable
USAGE: die message Exit 2 and print message to STDERR
USAGE: load LOADABLE Enable the following builtin from $BASH_LOADABLE_PATH and add it to RUNTIME_LOAD NOTE: With bash 5.2 https://github.com/bminor/bash/blob/devel/NEWS-5.2#L32 The're will be a default PATH
USAGE: import IMPORT Example: import core/mktemp Source the following lib from $IMPORT_PATH (: seperated list like $PATH). The lib need to have the following suffix: .shm
The Core doc will be written inside: doc/{core,extra,parser}