Mercurial > hg > octave-lyh
view src/mk-oct-links.in @ 2599:9705ea40f0a2
[project @ 1996-12-19 04:49:09 by jwe]
author | jwe |
---|---|
date | Thu, 19 Dec 1996 04:49:28 +0000 |
parents | 0c5e671499ed |
children | 337a09dd1c06 |
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 *( *//' -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 $?