diff options
author | Robert Alessi <alessi@robertalessi.net> | 2024-03-26 09:46:18 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2024-03-26 09:46:18 +0100 |
commit | f1c6222055b350356b7b8fd278e6317c325163fd (patch) | |
tree | 45464462392a5c4747084bfe6148d9f3b20fd08b /mkobsdsymlinks | |
parent | 6ac720c04e7755a63d3639f9c907a4ee8123c828 (diff) | |
download | texlive-openbsd-f1c6222055b350356b7b8fd278e6317c325163fd.tar.gz |
renamed mkobsdsymlinks -> mktexobsdsymlinks
Diffstat (limited to 'mkobsdsymlinks')
-rw-r--r-- | mkobsdsymlinks | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/mkobsdsymlinks b/mkobsdsymlinks deleted file mode 100644 index efcb780..0000000 --- a/mkobsdsymlinks +++ /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 | ||