#!/bin/sh
-# $Id: make-tar.sh,v 1.21 2022/02/05 17:57:20 tom Exp $
+# $Id: make-tar.sh,v 1.23 2022/11/05 20:29:41 tom Exp $
##############################################################################
# Copyright 2019-2021,2022 Thomas E. Dickey #
# Copyright 2010-2015,2017 Free Software Foundation, Inc. #
: "${DESTDIR:=$TARGET}"
: "${TMPDIR:=/tmp}"
+# make timestamps of generated files predictable
+same_timestamp() {
+ touch -r ../NEWS "$1"
+}
+
grep_assign() {
grep_assign=`grep -E "^$2\>" "$1" | sed -e "s/^$2[ ]*=[ ]*//" -e 's/"//g'`
eval "$2"=\""$grep_assign"\"
-e "s/\\<YYYYMMDD\\>/$NCURSES_PATCH/g" "$1" >"$1.new"
chmod u+w "$1"
mv "$1.new" "$1"
+ same_timestamp "$1"
}
make_changelog() {
-- `head -n 1 "$HOME"/.signature` `date -R`
EOF
+ same_timestamp "$1"
}
# This can be run from either the subdirectory, or from the top-level
cp -p -r Ada* $BUILD/$ROOTNAME/doc/
cp -p -r ada $BUILD/$ROOTNAME/doc/
+
+ cd ../../Ada95 || exit
fi
cp -p "$SOURCE/NEWS" $BUILD/$ROOTNAME
touch $BUILD/$ROOTNAME/MANIFEST
( cd $BUILD/$ROOTNAME && find . -type f -print | "$SOURCE/misc/csort" >MANIFEST )
+same_timestamp $BUILD/$ROOTNAME/MANIFEST
cd $BUILD || exit
# Make the files writable...
chmod -R u+w .
-tar cf - $ROOTNAME | gzip >"$DESTDIR/$ROOTNAME.tar.gz"
+# Cleanup timestamps
+[ -n "$TOUCH_DIRS" ] && "$TOUCH_DIRS" "$ROOTNAME"
+
+tar cf - $TAR_OPTIONS $ROOTNAME | gzip >"$DESTDIR/$ROOTNAME.tar.gz"
cd "$DESTDIR" || exit
pwd