Upstream TeX Live man pages: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Suppose we have installed the upstream [https://tug.org/texlive/ TeX Live from TUG] to <code>/usr/local/texlive/20XX/</code> and the executables are in <code>/usr/local/texlive/20XX/bin/amd64-freebsd</code>. | Suppose we have installed the upstream [https://tug.org/texlive/ TeX Live from TUG] to <code>/usr/local/texlive/20XX/</code> and the executables are in <code>/usr/local/texlive/20XX/bin/amd64-freebsd</code>. | ||
* <code># ln -s ../../texmf-dist/doc/man /usr/local/texlive/ | * <code># ln -s ../../texmf-dist/doc/man /usr/local/texlive/20XX/bin/amd64-freebsd/man</code> | ||
This allows <code>manpath</code> find the man pages. | This allows <code>manpath</code> find the man pages. | ||
* <code># find /usr/local/texlive/ | * <code># find /usr/local/texlive/20XX/texmf-dist/doc/man/ -type f -exec /root/npbin/tlsoman2hardlink {} \;</code> | ||
Here the script <code>/root/npbin/tlsoman2hardlink</code> | |||
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
if grep "^\.so" $1 >/dev/null 2>&1 && [ "$(wc -l < $1)" -eq 1 ] ; then | if grep "^\.so" "$1" >/dev/null 2>&1 && [ "$(wc -l < "$1")" -eq 1 ] ; then | ||
f=$1 | f=$1 | ||
cd $(dirname $f) | cd "$(dirname "$f")" || exit | ||
ff=$(cat $f) | ff=$(cat "$f") | ||
set $ff | set $ff | ||
rm -f $f | rm -f "$f" | ||
echo replacing $f with a hard link | echo replacing "$f" with a hard link | ||
ln $(basename $2) $f || echo "$ff" > $f | ln "$(basename "$2")" "$f" || echo "$ff" > "$f" | ||
chmod 644 $f | chmod 644 "$f" | ||
fi | fi | ||
</pre> | </pre> | ||
| Line 23: | Line 23: | ||
This command should be run after every upgrade. | This command should be run after every upgrade. | ||
An update script <code>/root/bin/tlup</code> to be run from time to time: | |||
<pre> | |||
#!/bin/sh | |||
tlmgr update --self --all | |||
inst=$(which tex | cut -d/ -f-5) | |||
find "$inst"/texmf-dist/doc/man/ \ | |||
-type f -exec /root/npbin/tlsoman2hardlink {} \; | |||
</pre> | |||
[[Category: FreeBSD]] | [[Category: FreeBSD]] | ||
Latest revision as of 16:39, 18 April 2025
Suppose we have installed the upstream TeX Live from TUG to /usr/local/texlive/20XX/ and the executables are in /usr/local/texlive/20XX/bin/amd64-freebsd.
# ln -s ../../texmf-dist/doc/man /usr/local/texlive/20XX/bin/amd64-freebsd/man
This allows manpath find the man pages.
# find /usr/local/texlive/20XX/texmf-dist/doc/man/ -type f -exec /root/npbin/tlsoman2hardlink {} \;
Here the script /root/npbin/tlsoman2hardlink
#!/bin/sh if grep "^\.so" "$1" >/dev/null 2>&1 && [ "$(wc -l < "$1")" -eq 1 ] ; then f=$1 cd "$(dirname "$f")" || exit ff=$(cat "$f") set $ff rm -f "$f" echo replacing "$f" with a hard link ln "$(basename "$2")" "$f" || echo "$ff" > "$f" chmod 644 "$f" fi
replaces .so's (which practically not supported by mandoc) with hard links.
This command should be run after every upgrade.
An update script /root/bin/tlup to be run from time to time:
#!/bin/sh
tlmgr update --self --all
inst=$(which tex | cut -d/ -f-5)
find "$inst"/texmf-dist/doc/man/ \
-type f -exec /root/npbin/tlsoman2hardlink {} \;