aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2024-04-27 11:44:55 +0200
committerRobert Alessi <alessi@robertalessi.net>2024-04-27 11:44:55 +0200
commitcd31b504ab7715af3e4c16d19e441581ea1f683c (patch)
tree3b788d59f26ee429ebdfe541921bee7cbfefe631
parentb0c2f3df1eb678eef6e511af9109318408c42244 (diff)
downloadtexlive-openbsd-cd31b504ab7715af3e4c16d19e441581ea1f683c.tar.gz
added tlobsd help
-rw-r--r--README.md6
-rw-r--r--tlobsd19
2 files changed, 23 insertions, 2 deletions
diff --git a/README.md b/README.md
index 3b486aa..49615de 100644
--- a/README.md
+++ b/README.md
@@ -245,6 +245,12 @@ tlobsd mksymlinks
245 245
246Just as `tlobsd tlmgr`, this command requires the `subversion` package. 246Just as `tlobsd tlmgr`, this command requires the `subversion` package.
247 247
248### More information on `tlobsd`:
249
250```sh
251tlobsd help
252```
253
248Building the sources 254Building the sources
249-------------------- 255--------------------
250 256
diff --git a/tlobsd b/tlobsd
index 14ebc6c..2ca4495 100644
--- a/tlobsd
+++ b/tlobsd
@@ -5,10 +5,25 @@
5cmd=$@ 5cmd=$@
6export tlobsd=1 6export tlobsd=1
7 7
8function help {
9 TLBINPATH=$(which latex 2>/dev/null | sed 's/\/latex$//')
10 echo -e "
11Known actions to \033[1mtlobsd\033[0m:
12 \033[4mhelp\033[0m\t\tPrints this page.
13 \033[4mtlmgr\033[0m\t\tThis action accepts the exact same options and arguments as \033[4mtlmgr(1)\033[0m.
14 \033[4mmksymlinks\033[0m\tUpdates all existing links in \033[4m${TLBINPATH}\033[0m
15 \t\tand installs new links.
16 \033[4mversion\033[0m\tGives version information.
17"
18}
19
8# no $cmd 20# no $cmd
9if [[ -z ${cmd} ]];then 21if [[ -z ${cmd} ]];then
10 echo "$(basename $0): unknown action" 22 echo "$(basename $0): unknown action"
11 exit 1 23 exit 1
24# help
25elif [[ $1 == "help" ]];then
26 $cmd
12# tlmgr 27# tlmgr
13elif [[ $1 == "tlmgr" ]];then 28elif [[ $1 == "tlmgr" ]];then
14 $cmd 29 $cmd
@@ -21,9 +36,9 @@ elif [[ $1 == "version" ]];then
21 TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }') 36 TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }')
22 TLOBSD_DATE=$(stat -t '%F' $(which tlobsd) | awk '{ gsub("\"", "", $10) }; { print $10 }') 37 TLOBSD_DATE=$(stat -t '%F' $(which tlobsd) | awk '{ gsub("\"", "", $10) }; { print $10 }')
23 OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }') 38 OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }')
24 echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})" 39 echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})."
25# something that is unknown to tlobsd 40# something that is unknown to tlobsd
26else 41else
27 echo "$1 is not known to $(basename $0). Try: ${cmd} --help if you need it." 42 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."
28 exit 1 43 exit 1
29fi 44fi