summaryrefslogtreecommitdiff
path: root/Util
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-08-23 21:01:58 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-08-23 21:01:58 +0100
commitcc6e9db29da73bb226b6e53ff4df0f135207d206 (patch)
treef750269507cfb7e5877c92f61fc4973fa12a3566 /Util
parent510a11834a8485cb9c3d55d73770b4f3710c7447 (diff)
downloadzsh-cc6e9db29da73bb226b6e53ff4df0f135207d206.tar.gz
zsh-cc6e9db29da73bb226b6e53ff4df0f135207d206.zip
33047: use git to simplify massively source distribution file selection
Diffstat (limited to 'Util')
-rw-r--r--Util/.distfiles6
-rwxr-xr-xUtil/mkdisttree.sh13
2 files changed, 12 insertions, 7 deletions
diff --git a/Util/.distfiles b/Util/.distfiles
index 162ace386..411938591 100644
--- a/Util/.distfiles
+++ b/Util/.distfiles
@@ -1,10 +1,4 @@
DISTFILES_SRC='
- .distfiles
- check_exports
- helpfiles
- mkdisttree.sh
- preconfig
- reporter
'
DISTFILES_NOT='
difflog.pl
diff --git a/Util/mkdisttree.sh b/Util/mkdisttree.sh
index 17b936ed7..2d55b06f8 100755
--- a/Util/mkdisttree.sh
+++ b/Util/mkdisttree.sh
@@ -51,9 +51,15 @@ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15
( while read dfn; do
subdir=`echo $dfn | sed 's,/\.distfiles$,,'`
echo >&2 "Processing directory $subdir..."
- eval "DISTFILES_$type="
+ eval "DISTFILES_$type= DISTFILES_NOT="
. $sdir_top/$dfn
eval "distfiles=\$DISTFILES_$type"
+ if [ $type = SRC ]; then
+ # All files in git appear in the source bundle, unless
+ # explicitly excluded with DISTFILES_NOT.
+ distfiles="$distfiles
+ `cd $sdir_top/$subdir; git ls-files | grep -v /`"
+ fi
if test -n "$distfiles"; then
cmds=`echo "$distfiles" | sed -e "$sed_separate"`
eval "$cmds"
@@ -62,6 +68,11 @@ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15
fi
$sdir_top/mkinstalldirs $disttree/$subdir || exit 1
for f in $deplist `test -z "$globlist" || ( cd $dir_top/$subdir && eval "echo $globlist")`; do
+ for fnot in $DISTFILES_NOT; do
+ if [ $fnot = $f ]; then
+ continue 2
+ fi
+ done
if test -f $dir_top/$subdir/$f; then
# ln $dir_top/$subdir/$f $disttree/$subdir/$f || \
cp -p $dir_top/$subdir/$f $disttree/$subdir/$f || exit 1