From 6ac720c04e7755a63d3639f9c907a4ee8123c828 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 24 Mar 2024 08:16:05 +0100 Subject: mksymlinks -> mkobsdsymlinks --- mkobsdsymlinks | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mksymlinks | 59 ---------------------------------------------------------- tl-build.sh | 2 +- 3 files changed, 60 insertions(+), 60 deletions(-) create mode 100644 mkobsdsymlinks delete mode 100644 mksymlinks diff --git a/mkobsdsymlinks b/mkobsdsymlinks new file mode 100644 index 0000000..efcb780 --- /dev/null +++ b/mkobsdsymlinks @@ -0,0 +1,59 @@ +#!/bin/sh +# +# $TeX Live for OpenBSD, 2024/03/21 $ + +TLBINDIR=$(dirname $0) +REL=../.. +LSTFILE=$(mktemp) +AMFILE=$(mktemp) + +if [[ ! -w ${TLBINDIR} ]]; then + echo "You do not have write permissions to ${TLBINDIR}" + exit 1 +fi + +which svn 2>&- > /dev/null +if [[ $? -ne 0 ]];then + echo "Please install the subversion package." + exit 1 +fi + +svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/scripts.lst \ + ${LSTFILE} || exit 1 + +svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/Makefile.am \ + ${AMFILE} || exit 1 +bin_links=$(awk '/bin_links = \\/,/^$/' ${AMFILE} | awk NF | grep -v bin_links | sed 's,\\,,') + +cd ${TLBINDIR} && \ + for s in $(cat ${LSTFILE} | grep -v \') + do + target=`basename $s | tr '[A-Z]' '[a-z]'` + echo "$s" | grep 'memoize-.*\.' >/dev/null \ + || echo "$s" | grep 'listings-ext.sh' >/dev/null \ + || target=`echo $target | sed 's,\.[^/]*$,,'`; \ + if [[ $1 == "remove" ]];then + rm -f $target + else + rm -f $target + echo "creating link '$target' -> '$REL/texmf-dist/scripts/$s'" + ln -s $REL/texmf-dist/scripts/$s $target || exit 1 + fi + done && \ + for s in ${bin_links} + do + link=`echo $s | sed 's,.*:,,'` + file=`echo $s | sed 's,:.*,,'` + if [[ $1 == "remove" ]];then + rm -f $link + else + rm -f $link + echo "creating link '$link' -> '$file'" + ln -s $file $link || exit 1 + fi + done + +if [[ $1 == "remove" ]] +then + echo "all symlinks have been removed. why did you do this?" +fi diff --git a/mksymlinks b/mksymlinks deleted file mode 100644 index efcb780..0000000 --- a/mksymlinks +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# -# $TeX Live for OpenBSD, 2024/03/21 $ - -TLBINDIR=$(dirname $0) -REL=../.. -LSTFILE=$(mktemp) -AMFILE=$(mktemp) - -if [[ ! -w ${TLBINDIR} ]]; then - echo "You do not have write permissions to ${TLBINDIR}" - exit 1 -fi - -which svn 2>&- > /dev/null -if [[ $? -ne 0 ]];then - echo "Please install the subversion package." - exit 1 -fi - -svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/scripts.lst \ - ${LSTFILE} || exit 1 - -svn --force export svn://tug.org/texlive/trunk/Build/source/texk/texlive/linked_scripts/Makefile.am \ - ${AMFILE} || exit 1 -bin_links=$(awk '/bin_links = \\/,/^$/' ${AMFILE} | awk NF | grep -v bin_links | sed 's,\\,,') - -cd ${TLBINDIR} && \ - for s in $(cat ${LSTFILE} | grep -v \') - do - target=`basename $s | tr '[A-Z]' '[a-z]'` - echo "$s" | grep 'memoize-.*\.' >/dev/null \ - || echo "$s" | grep 'listings-ext.sh' >/dev/null \ - || target=`echo $target | sed 's,\.[^/]*$,,'`; \ - if [[ $1 == "remove" ]];then - rm -f $target - else - rm -f $target - echo "creating link '$target' -> '$REL/texmf-dist/scripts/$s'" - ln -s $REL/texmf-dist/scripts/$s $target || exit 1 - fi - done && \ - for s in ${bin_links} - do - link=`echo $s | sed 's,.*:,,'` - file=`echo $s | sed 's,:.*,,'` - if [[ $1 == "remove" ]];then - rm -f $link - else - rm -f $link - echo "creating link '$link' -> '$file'" - ln -s $file $link || exit 1 - fi - done - -if [[ $1 == "remove" ]] -then - echo "all symlinks have been removed. why did you do this?" -fi diff --git a/tl-build.sh b/tl-build.sh index d81e41f..23ca054 100755 --- a/tl-build.sh +++ b/tl-build.sh @@ -149,7 +149,7 @@ function include_asymptote { function include_extras { if [[ -d ${tl_sourcedir}/inst/bin ]];then tl_bindir=${tl_sourcedir}/inst/bin/`ls ${tl_sourcedir}/inst/bin` - install -m 0755 ${this_dir}/mksymlinks ${tl_bindir}/mktexobsdsymlinks + install -m 0755 ${this_dir}/mktexobsdsymlinks ${tl_bindir}/mktexobsdsymlinks fi } -- cgit v1.2.3