#!/bin/sh
-# $Id: make-tar.sh,v 1.1 2010/02/20 23:42:40 tom Exp $
+# $Id: make-tar.sh,v 1.5 2011/03/19 19:29:44 tom Exp $
##############################################################################
-# Copyright (c) 2010 Free Software Foundation, Inc. #
+# Copyright (c) 2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
# scripts. The reason for doing that is to simplify distributing the test
# programs as a separate package.
-ROOTNAME=ncurses-test
+CDPATH=:
+export CDPATH
TARGET=`pwd`
-: ${TMPDIR=/tmp}
+: ${ROOTNAME:=ncurses-test}
+: ${DESTDIR:=$TARGET}
+: ${TMPDIR:=/tmp}
# This can be run from either the test subdirectory, or from the top-level
# source directory. We will put the tar file in the original directory.
test -d ./test && cd ./test
+SOURCE=`cd ..;pwd`
BUILD=$TMPDIR/make-tar$$
trap "cd /; rm -rf $BUILD; exit 0" 0 1 2 5 15
# Add the config.* utility scripts from the top-level directory.
for i in . ..
do
- for j in config.guess config.sub
+ for j in config.guess config.sub install-sh tar-copy.sh
do
test -f $i/$j && cp -p $i/$j $BUILD/$ROOTNAME/
done
done
+cp -p $SOURCE/NEWS $BUILD/$ROOTNAME
+
+touch $BUILD/$ROOTNAME/MANIFEST
+( cd $BUILD/$ROOTNAME && find . -type f -print |$SOURCE/misc/csort >MANIFEST )
+
cd $BUILD || exit
# There is no need for this script in the tar file.
# Make the files writable...
chmod -R u+w .
-tar cf - $ROOTNAME | gzip >$TARGET/$ROOTNAME.tar.gz
-cd $TARGET
+tar cf - $ROOTNAME | gzip >$DESTDIR/$ROOTNAME.tar.gz
+cd $DESTDIR
pwd
ls -l $ROOTNAME.tar.gz