From cd31b504ab7715af3e4c16d19e441581ea1f683c Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 27 Apr 2024 11:44:55 +0200 Subject: added tlobsd help --- tlobsd | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'tlobsd') diff --git a/tlobsd b/tlobsd index 14ebc6c..2ca4495 100644 --- a/tlobsd +++ b/tlobsd @@ -5,10 +5,25 @@ cmd=$@ export tlobsd=1 +function help { + TLBINPATH=$(which latex 2>/dev/null | sed 's/\/latex$//') + echo -e " +Known actions to \033[1mtlobsd\033[0m: + \033[4mhelp\033[0m\t\tPrints this page. + \033[4mtlmgr\033[0m\t\tThis action accepts the exact same options and arguments as \033[4mtlmgr(1)\033[0m. + \033[4mmksymlinks\033[0m\tUpdates all existing links in \033[4m${TLBINPATH}\033[0m + \t\tand installs new links. + \033[4mversion\033[0m\tGives version information. +" +} + # no $cmd if [[ -z ${cmd} ]];then echo "$(basename $0): unknown action" exit 1 +# help +elif [[ $1 == "help" ]];then + $cmd # tlmgr elif [[ $1 == "tlmgr" ]];then $cmd @@ -21,9 +36,9 @@ elif [[ $1 == "version" ]];then TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }') TLOBSD_DATE=$(stat -t '%F' $(which tlobsd) | awk '{ gsub("\"", "", $10) }; { print $10 }') OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }') - echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})" + echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})." # something that is unknown to tlobsd else - echo "$1 is not known to $(basename $0). Try: ${cmd} --help if you need it." + echo -e "\033[1m$1\033[0m is not known to \033[1m$(basename $0)\033[0m. Try: \033[1m${cmd} --help\033[0m if you need it, or \033[1m$(basename $0) help\033[0m." exit 1 fi -- cgit v1.2.3