use cat with here document instead of a couple of echos for

generation of test.sh (which grew...)
This commit is contained in:
tg 2008-04-01 17:13:49 +00:00
parent 4738940ded
commit 448496a74e
1 changed files with 13 additions and 11 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.307 2008/03/28 22:56:15 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.308 2008/04/01 17:13:49 tg Exp $'
#- #-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -1225,16 +1225,18 @@ case $curdir in
*\ *) echo "#!./mksh" >test.sh ;; *\ *) echo "#!./mksh" >test.sh ;;
*) echo "#!$curdir/mksh" >test.sh ;; *) echo "#!$curdir/mksh" >test.sh ;;
esac esac
echo "export PATH='$PATH'" >>test.sh cat >>test.sh <<-EOF
echo "print Testing mksh for conformance:" >>test.sh export PATH='$PATH'
echo "fgrep MirOS: '$srcdir/check.t'" >>test.sh print Testing mksh for conformance:
echo "fgrep MIRBSD '$srcdir/check.t'" >>test.sh fgrep MirOS: '$srcdir/check.t'
echo 'print "This shell is actually:\n\t$KSH_VERSION"' >>test.sh fgrep MIRBSD '$srcdir/check.t'
echo "print 'test.sh built for mksh $dstversion'" >>test.sh print "This shell is actually:\\n\\t\$KSH_VERSION"
echo "perl=perl5" >>test.sh print 'test.sh built for mksh $dstversion'
echo "\$perl -e print >/dev/null 2>&1 || perl=perl" >>test.sh perl=perl5
echo "exec \$perl '$srcdir/check.pl' -s '$srcdir/check.t'" \ \$perl -e print >/dev/null 2>&1 || perl=perl
"-p '$curdir/mksh' -C $check_categories \$*$tsts" >>test.sh exec \$perl '$srcdir/check.pl' -s '$srcdir/check.t' \\
-p '$curdir/mksh' -C $check_categories \$*$tsts
EOF
chmod 755 test.sh chmod 755 test.sh
echo set -x >Rebuild.sh echo set -x >Rebuild.sh
for file in $SRCS; do for file in $SRCS; do