summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-08-21 15:25:57 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-08-21 15:25:57 +0000
commit39ef5f81dcc9f9227c60ec4c9e24cffb4e9d3116 (patch)
treebda83ee8324be06d2cdedc49067e2a2404b05472 /testsuite
parenta423eb41d011e73be645b63c3e3b19b993937e1c (diff)
downloadmailutils-39ef5f81dcc9f9227c60ec4c9e24cffb4e9d3116.tar.gz
mailutils-39ef5f81dcc9f9227c60ec4c9e24cffb4e9d3116.tar.bz2
New option -subst: sets sed command
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/makespool23
1 files changed, 16 insertions, 7 deletions
diff --git a/testsuite/makespool b/testsuite/makespool
index 58a796362..633c389b3 100755
--- a/testsuite/makespool
+++ b/testsuite/makespool
@@ -16,11 +16,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-if [ "$1" = "-r" ]; then
- shift
- rm -rf $*
- exit 0
-fi
+REGEXP=""
+
+case "$1" in
+ "-r") shift
+ rm -rf $*
+ exit 0;;
+ "-subst") REGEXP="$2"
+ shift 2;;
+esac
mkdirhier() {
dir=""
@@ -52,7 +56,12 @@ do
cat $SRCDIR/DISTFILES |
while read NAME
do
- cp $SRCDIR/$NAME $DSTDIR/$NAME
- chmod u+w $DSTDIR/$NAME
+ case "$NAME" in
+ *.in) newname=`echo $NAME|sed 's/\(.*\)\.in$/\1/'`
+ sed "$REGEXP" $SRCDIR/$NAME > $DSTDIR/$newname;;
+ *) newname=$NAME
+ cp $SRCDIR/$NAME $DSTDIR/$newname;;
+ esac
+ chmod u+w $DSTDIR/$newname
done
done

Return to:

Send suggestions and report system problems to the System administrator.