add btinclude finction to output code for usage in scripts

This commit is contained in:
Rob Pearce 2022-09-27 19:20:24 +10:00
parent bba12d9d81
commit 65bfe621f3
1 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,14 @@ SPINNERFILE="$BASHTOOLS_DIR/spinner.pid"
export REGEXP_IP='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$'
function btinclude() {
echo '. ${HOME}/code/bashtools/bashtools.sh'
echo 'if [[ -z $HAVE_BASHTOOLS ]]; then'
echo ' echo "ERROR: bashtools not installed download from https://git.nethack.net/rob/bashtools" >/dev/stderr'
echo ' exit 1'
echo 'fi'
}
function ansi(){
export BOLD="\033[1m"
export PLAIN="\033[0m"