Mercurial > octave-nkf
view src/mk-oct-links.in @ 1839:5a579fa44924
[project @ 1996-02-03 09:29:57 by jwe]
author | jwe |
---|---|
date | Sat, 03 Feb 1996 09:31:38 +0000 |
parents | c4649e82dbb4 |
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