zsh-workers
 help / color / mirror / code / Atom feed
From: zefram@fysh.org
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: mkdisttree.sh tweaks
Date: Wed, 8 Dec 1999 16:55:38 GMT	[thread overview]
Message-ID: <199912081655.QAA16869@mango.dublin.iona.ie> (raw)

This fixes a portability problem in mkdisttree.sh (not all finds have
-false), and makes the error handling much more reliable.

diff -cr ../zsh-cvs-snapshot-08.12.1999.04.04.02/Util/mkdisttree.sh Util/mkdisttree.sh
*** ../zsh-cvs-snapshot-08.12.1999.04.04.02/Util/mkdisttree.sh	Thu Apr 15 19:05:41 1999
--- Util/mkdisttree.sh	Wed Dec  8 16:51:52 1999
***************
*** 42,51 ****
      s/;;*/;/g
  '
  
  (
      cd $sdir_top
!     find . \( -name '*.*' -prune -false \) -o \( -name .distfiles -print \)
! ) | while read dfn; do
      subdir=`echo $dfn | sed 's,/\.distfiles$,,'`
      echo >&2 "Processing directory $subdir..."
      eval "DISTFILES_$type="
--- 42,54 ----
      s/;;*/;/g
  '
  
+ filelist=filelist$$
+ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15
  (
      cd $sdir_top
!     find . \( -name '*.*' -prune \) -o \( -name .distfiles -print \)
! ) > $filelist
! ( while read dfn; do
      subdir=`echo $dfn | sed 's,/\.distfiles$,,'`
      echo >&2 "Processing directory $subdir..."
      eval "DISTFILES_$type="
***************
*** 55,61 ****
  	cmds=`echo "$distfiles" | sed -e "$sed_separate"`
  	eval "$cmds"
  	if test -n "$deplist" && test -f $dir_top/$subdir/Makefile; then
! 	    ( cd $dir_top/$subdir && "$@" $deplist ) || exit 1
  	fi
  	$sdir_top/mkinstalldirs $disttree/$subdir || exit 1
  	for f in $deplist `test -z "$globlist" || ( cd $dir_top/$subdir && eval "echo $globlist")`; do
--- 58,64 ----
  	cmds=`echo "$distfiles" | sed -e "$sed_separate"`
  	eval "$cmds"
  	if test -n "$deplist" && test -f $dir_top/$subdir/Makefile; then
! 	    ( trap '' 1 2 15; cd $dir_top/$subdir && "$@" $deplist ) || exit 1
  	fi
  	$sdir_top/mkinstalldirs $disttree/$subdir || exit 1
  	for f in $deplist `test -z "$globlist" || ( cd $dir_top/$subdir && eval "echo $globlist")`; do
***************
*** 71,76 ****
  	    fi
  	done
      fi
! done
  
  exec chmod -R a+rX,u+w,go-w $disttree
--- 74,87 ----
  	    fi
  	done
      fi
! done ) < $filelist
! 
! status=$?
! rm -f $filelist
! trap '' 1 2 15
! if test $status -ne 0; then
!     rm -rf $disttree
!     exit $status
! fi
  
  exec chmod -R a+rX,u+w,go-w $disttree
END


                 reply	other threads:[~1999-12-08 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199912081655.QAA16869@mango.dublin.iona.ie \
    --to=zefram@fysh.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).