blob: 5f226c50b044867331847f9ab224b88d80c42cde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
#
# $TeX Live for OpenBSD, 2024/04/26 $
cmd=$@
export tlobsd=1
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 }')
# no $cmd
if [[ -z ${cmd} ]];then
echo "$(basename $0): unknown action"
exit 1
# tlmgr
elif [[ $1 == "tlmgr" ]];then
$cmd
[[ $? -eq 0 ]] && tlobsd-mksymlinks 1> /dev/null
# symlinks
elif [[ $1 == "mksymlinks" ]];then
tlobsd-mksymlinks $2
# version
elif [[ $1 == "version" ]];then
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."
exit 1
fi
|