Upstream TeX Live man pages: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
* <code># find /usr/local/texlive/2024/texmf-dist/doc/man/ -type f -exec /root/npbin/tlsoman2hardlink {} \;</code> | * <code># find /usr/local/texlive/2024/texmf-dist/doc/man/ -type f -exec /root/npbin/tlsoman2hardlink {} \;</code> | ||
where the script <code>/root/npbin/tlsoman2hardlink</code> | |||
<pre> | |||
#!/bin/sh | |||
if grep "^\.so" $1 >/dev/null 2>&1 && [ "$(wc -l < $1)" -eq 1 ] ; then | |||
f=$1 | |||
cd $(dirname $f) | |||
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 | |||
</pre> | |||
replaces <code>.so's</code> (which practically not supported by mandoc) with hard links. | |||
This command should be run after every upgrade. | |||
[[Category: FreeBSD]] | [[Category: FreeBSD]] | ||
Revision as of 22:38, 25 November 2024
Suppose we install 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/2024/bin/amd64-freebsd/man
This allows manpath find the man pages.
# find /usr/local/texlive/2024/texmf-dist/doc/man/ -type f -exec /root/npbin/tlsoman2hardlink {} \;
where 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) 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.