Mercurial > hg > octave-lyh
view src/mk-oct-links.in @ 2412:1a1901564492
[project @ 1996-10-15 16:51:13 by jwe]
author | jwe |
---|---|
date | Tue, 15 Oct 1996 16:54:58 +0000 |
parents | fe675f6fa03a |
children | 7ee42ff6536a |
line wrap: on
line source
#! /bin/sh -e # Create additional links to .oct files that define more than one # function. # The first arg is taken as the directory where the .oct files are # installed. The remaining arguments should be the list of source # files that were used to create the .oct files. LN_S="@LN_S@" links_dir=$1 shift for f in "$@"; do base=`basename $f | sed 's/\.cc$//'` fcns=`grep -h '^ *DEFUN_DLD' $f |\ sed -e 's/DEFUN_DLD_BUILTIN *( *//' -e 's/ *,.*$//' |\ sort -u` if [ -n "$fcns" ]; then for n in $fcns; do if [ "$n" = "$base" ]; then true else echo "creating link $n.oct -> $base.oct" ( cd $links_dir; rm -f $n.oct; $LN_S $base.oct $n.oct ) fi done fi done exit $?