diff options
author | Robert Alessi <alessi@robertalessi.net> | 2024-04-27 07:42:34 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2024-04-27 07:42:34 +0200 |
commit | b0c2f3df1eb678eef6e511af9109318408c42244 (patch) | |
tree | 8719d4007267c721c9c9dff279c2b91789aaaf0e /tlobsd | |
parent | 4ba50564aefec9c8756f9314baf84bbfd147a8fa (diff) | |
download | texlive-openbsd-b0c2f3df1eb678eef6e511af9109318408c42244.tar.gz |
tlobsd: moved vars into 'version' action
Diffstat (limited to 'tlobsd')
-rw-r--r-- | tlobsd | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,14 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # $TeX Live for OpenBSD, 2024/04/26 $ | 3 | # $TeX Live for OpenBSD, 2024/04/27 $ |
4 | 4 | ||
5 | cmd=$@ | 5 | cmd=$@ |
6 | export tlobsd=1 | 6 | export tlobsd=1 |
7 | 7 | ||
8 | TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }') | ||
9 | TLOBSD_DATE=$(stat -t '%F' $(which tlobsd) | awk '{ gsub("\"", "", $10) }; { print $10 }') | ||
10 | OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }') | ||
11 | |||
12 | # no $cmd | 8 | # no $cmd |
13 | if [[ -z ${cmd} ]];then | 9 | if [[ -z ${cmd} ]];then |
14 | echo "$(basename $0): unknown action" | 10 | echo "$(basename $0): unknown action" |
@@ -22,6 +18,9 @@ elif [[ $1 == "mksymlinks" ]];then | |||
22 | tlobsd-mksymlinks $2 | 18 | tlobsd-mksymlinks $2 |
23 | # version | 19 | # version |
24 | elif [[ $1 == "version" ]];then | 20 | elif [[ $1 == "version" ]];then |
21 | TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }') | ||
22 | TLOBSD_DATE=$(stat -t '%F' $(which tlobsd) | awk '{ gsub("\"", "", $10) }; { print $10 }') | ||
23 | OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }') | ||
25 | echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})" | 24 | echo "${TL_RELEASE} for OpenBSD ${OPENBSD_VERSION} (Compiled ${TLOBSD_DATE})" |
26 | # something that is unknown to tlobsd | 25 | # something that is unknown to tlobsd |
27 | else | 26 | else |