X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/262d0dc43a7fb835839b24ad62cb594c0dc0d5fd..7ca2e4c45a732314c3790f844da1f69dcc86175b:/mklinks.in diff --git a/mklinks.in b/mklinks.in deleted file mode 100755 index 3548946..0000000 --- a/mklinks.in +++ /dev/null @@ -1,86 +0,0 @@ -#! /bin/sh -### -*-sh-*- -### -### Create links to the repository -### -### (c) 1997 Mark Wooding -### - -###----- Licensing notice --------------------------------------------------- -### -### This file is part of the Common Files Distribution (`common'). -### -### `Common' is free software; you can redistribute it and/or modify -### it under the terms of the GNU General Public License as published by -### the Free Software Foundation; either version 2 of the License, or -### (at your option) any later version. -### -### `Common' is distributed in the hope that it will be useful, -### but WITHOUT ANY WARRANTY; without even the implied warranty of -### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -### GNU General Public License for more details. -### -### You should have received a copy of the GNU General Public License -### along with `common'; if not, write to the Free Software Foundation, -### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -set -e - -pkgdatadir="@pkgdatadir@" -VERSION="@VERSION@" - -###-------------------------------------------------------------------------- -### Parse command line arguments. - -while [ $# -gt 0 ]; do - case "$1" in - -h | --h | --he | --hel | --help) - cat <&2 - exit 1 - ;; - *) - break - ;; - esac - shift -done - -###-------------------------------------------------------------------------- -### Main code. - -[ $# = 0 ] && set .links -cat "$@" | while read name; do - case "$name" in - "" | "#"*) continue ;; - *=*) want=${name##*=}; name=${name%=*} ;; - *) want=${name##*/} ;; - esac - if [ -r "$pkgdatadir/$want" ]; then - case "$name" in */*) mkdir -p "${name%/*}" ;; esac - rm -f "$name" - ln -sf "$pkgdatadir/$want" "$name" - fi -done - -###----- That's all, folks --------------------------------------------------