Mercurial > octave
view src/mk-oct-links.in @ 1674:c4649e82dbb4
[project @ 1995-12-27 23:47:44 by jwe]
Initial revision
author | jwe |
---|---|
date | Wed, 27 Dec 1995 23:47:44 +0000 |
parents | |
children | 1d4f67de06f4 |
line wrap: on
line source
#! /bin/sh # 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. 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 ( cd $links_dir; ln $base.oct $n.oct ) fi done fi done