aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2024-04-26 17:20:03 +0200
committerRobert Alessi <alessi@robertalessi.net>2024-04-26 17:20:03 +0200
commit4ba50564aefec9c8756f9314baf84bbfd147a8fa (patch)
tree3bb5072f1184480116045f630267e0279f646ab1
parentb8f1d3f936f369a2f8d8a4b40c765791e40251c9 (diff)
downloadtexlive-openbsd-4ba50564aefec9c8756f9314baf84bbfd147a8fa.tar.gz
tlobsd: new action 'version'
-rw-r--r--tlobsd9
1 files changed, 8 insertions, 1 deletions
diff --git a/tlobsd b/tlobsd
index 3342be5..5f226c5 100644
--- a/tlobsd
+++ b/tlobsd
@@ -1,10 +1,14 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $TeX Live for OpenBSD, 2024/03/28 $ 3# $TeX Live for OpenBSD, 2024/04/26 $
4 4
5cmd=$@ 5cmd=$@
6export tlobsd=1 6export tlobsd=1
7 7
8TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }')
9TLOBSD_DATE=$(stat -t '%F' $(which tlobsd) | awk '{ gsub("\"", "", $10) }; { print $10 }')
10OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }')
11
8# no $cmd 12# no $cmd
9if [[ -z ${cmd} ]];then 13if [[ -z ${cmd} ]];then
10 echo "$(basename $0): unknown action" 14 echo "$(basename $0): unknown action"
@@ -16,6 +20,9 @@ elif [[ $1 == "tlmgr" ]];then
16# symlinks 20# symlinks
17elif [[ $1 == "mksymlinks" ]];then 21elif [[ $1 == "mksymlinks" ]];then
18 tlobsd-mksymlinks $2 22 tlobsd-mksymlinks $2
23# version
24elif [[ $1 == "version" ]];then
25 echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})"
19# something that is unknown to tlobsd 26# something that is unknown to tlobsd
20else 27else
21 echo "$1 is not known to $(basename $0). Try: ${cmd} --help if you need it." 28 echo "$1 is not known to $(basename $0). Try: ${cmd} --help if you need it."