aboutsummaryrefslogtreecommitdiff
path: root/mksymlinks
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2024-03-24 08:16:05 +0100
committerRobert Alessi <alessi@robertalessi.net>2024-03-24 08:16:05 +0100
commit6ac720c04e7755a63d3639f9c907a4ee8123c828 (patch)
tree5adbbbb981827068abf257e000ffa47f3270b0b6 /mksymlinks
parentcdcc54462ee6812e40322b3d442b9a6395c8f28b (diff)
downloadtexlive-openbsd-6ac720c04e7755a63d3639f9c907a4ee8123c828.tar.gz
mksymlinks -> mkobsdsymlinks
Diffstat (limited to 'mksymlinks')
-rw-r--r--mksymlinks59
1 files changed, 0 insertions, 59 deletions
diff --git a/mksymlinks b/mksymlinks
deleted file mode 100644
index efcb780..0000000
--- a/mksymlinks
+++ /dev/null
@@ -1,59 +0,0 @@
1#!/bin/sh
2#
3# $TeX Live for OpenBSD, 2024/03/21 $
4
5TLBINDIR=$(dirname $0)
6REL=../..
7LSTFILE=$(mktemp)
8AMFILE=$(mktemp)
9
10if [[ ! -w ${TLBINDIR} ]]; then
11 echo "You do not have write permissions to ${TLBINDIR}"
12 exit 1
13fi
14
15which svn 2>&- > /dev/null
16if [[ $? -ne 0 ]];then
17 echo "Please install the subversion package."
18 exit 1
19fi
20
21svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/scripts.lst \
22 ${LSTFILE} || exit 1
23
24svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/Makefile.am \
25 ${AMFILE} || exit 1
26bin_links=$(awk '/bin_links = \\/,/^$/' ${AMFILE} | awk NF | grep -v bin_links | sed 's,\\,,')
27
28cd ${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
56if [[ $1 == "remove" ]]
57then
58 echo "all symlinks have been removed. why did you do this?"
59fi