From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2275 invoked from network); 9 Jul 1999 16:54:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jul 1999 16:54:56 -0000 Received: (qmail 11814 invoked by alias); 9 Jul 1999 16:54:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7092 Received: (qmail 11785 invoked from network); 9 Jul 1999 16:53:16 -0000 Message-Id: <9907091623.AA22532@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: PATCH: pws-25: old shell functions again In-Reply-To: "Peter Stephenson"'s message of "Fri, 09 Jul 1999 15:00:44 DFT." <9907091300.AA23352@ibmth.df.unipi.it> Date: Fri, 09 Jul 1999 18:23:35 +0200 From: Peter Stephenson Peter Stephenson wrote: > You wouldn't believe how much fantastic fun this all is. This time, the problem is that the globbing patterns don't get expanded until too late if the functions are living in the original source tree. --- Config/installfns.sh.yetagain Fri Jul 9 14:51:48 1999 +++ Config/installfns.sh Fri Jul 9 18:19:56 1999 @@ -6,7 +6,18 @@ $sdir_top/mkinstalldirs $fndir || exit 1; +# If the source directory is somewhere else, we need to force +# the shell to expand it in that directory, then strip it off. +install= for file in $FUNCTIONS_INSTALL; do + if test -f "$sdir/$file"; then + install="$install $file" + else + install="$install `echo $sdir/$file | sed -e \"s%$sdir/%%g\"`" + fi +done + +for file in $install; do if test -f $sdir/$file; then if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then subfile="$file" --- Config/uninstallfns.sh.yetagain Fri Jul 9 15:00:32 1999 +++ Config/uninstallfns.sh Fri Jul 9 18:20:17 1999 @@ -1,6 +1,17 @@ #!/bin/sh +# If the source directory is somewhere else, we need to force +# the shell to expand it in that directory, then strip it off. +install= for file in $FUNCTIONS_INSTALL; do + if test -f "$sdir/$file"; then + install="$install $file" + else + install="$install `echo $sdir/$file | sed -e \"s%$sdir/%%g\"`" + fi +done + +for file in $install; do if test -f $sdir/$file; then if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then rm -f $fndir/$file; -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy