diff options
author | Robert Alessi <alessi@robertalessi.net> | 2024-03-28 09:23:21 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2024-03-28 09:23:21 +0100 |
commit | 1b63fcabc2cb3c100c1a50136ce1e160e042b332 (patch) | |
tree | 05f25fdc8305a86752906a411d81554d24e6e9dc /mktexobsdsymlinks | |
parent | 910f40efb89c71fd39512417d8dc7b54d8f7a773 (diff) | |
download | texlive-openbsd-1b63fcabc2cb3c100c1a50136ce1e160e042b332.tar.gz |
new tlobsd wrapper
Diffstat (limited to 'mktexobsdsymlinks')
-rw-r--r-- | mktexobsdsymlinks | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/mktexobsdsymlinks b/mktexobsdsymlinks deleted file mode 100644 index efcb780..0000000 --- a/mktexobsdsymlinks +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # $TeX Live for OpenBSD, 2024/03/21 $ | ||
4 | |||
5 | TLBINDIR=$(dirname $0) | ||
6 | REL=../.. | ||
7 | LSTFILE=$(mktemp) | ||
8 | AMFILE=$(mktemp) | ||
9 | |||
10 | if [[ ! -w ${TLBINDIR} ]]; then | ||
11 | echo "You do not have write permissions to ${TLBINDIR}" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | which svn 2>&- > /dev/null | ||
16 | if [[ $? -ne 0 ]];then | ||
17 | echo "Please install the subversion package." | ||
18 | exit 1 | ||
19 | fi | ||
20 | |||
21 | svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/scripts.lst \ | ||
22 | ${LSTFILE} || exit 1 | ||
23 | |||
24 | svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/Makefile.am \ | ||
25 | ${AMFILE} || exit 1 | ||
26 | bin_links=$(awk '/bin_links = \\/,/^$/' ${AMFILE} | awk NF | grep -v bin_links | sed 's,\\,,') | ||
27 | |||
28 | cd ${TLBINDIR} && \ | ||
29 | for s in $(cat ${LSTFILE} | grep -v \') | ||
30 | do | ||
31 | target=`basename $s | tr '[A-Z]' '[a-z]'` | ||
32 | echo "$s" | grep 'memoize-.*\.' >/dev/null \ | ||
33 | || echo "$s" | grep 'listings-ext.sh' >/dev/null \ | ||
34 | || target=`echo $target | sed 's,\.[^/]*$,,'`; \ | ||
35 | if [[ $1 == "remove" ]];then | ||
36 | rm -f $target | ||
37 | else | ||
38 | rm -f $target | ||
39 | echo "creating link '$target' -> '$REL/texmf-dist/scripts/$s'" | ||
40 | ln -s $REL/texmf-dist/scripts/$s $target || exit 1 | ||
41 | fi | ||
42 | done && \ | ||
43 | for s in ${bin_links} | ||
44 | do | ||
45 | link=`echo $s | sed 's,.*:,,'` | ||
46 | file=`echo $s | sed 's,:.*,,'` | ||
47 | if [[ $1 == "remove" ]];then | ||
48 | rm -f $link | ||
49 | else | ||
50 | rm -f $link | ||
51 | echo "creating link '$link' -> '$file'" | ||
52 | ln -s $file $link || exit 1 | ||
53 | fi | ||
54 | done | ||
55 | |||
56 | if [[ $1 == "remove" ]] | ||
57 | then | ||
58 | echo "all symlinks have been removed. why did you do this?" | ||
59 | fi | ||