]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20090624 snapshot
authorChet Ramey <chet.ramey@case.edu>
Fri, 9 Dec 2011 01:11:38 +0000 (20:11 -0500)
committerChet Ramey <chet.ramey@case.edu>
Fri, 9 Dec 2011 01:11:38 +0000 (20:11 -0500)
MANIFEST
support/mk-takehome
tests/comsub-eof.right
tests/comsub-eof.tests
tests/comsub-eof5.sub [new file with mode: 0644]

index 1e1147686052d67ea5a1382cec97f5dbe6c59003..5de5867332571410a8032de56034eb2c0e9d1f29 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -782,6 +782,7 @@ tests/comsub-eof1.sub       f
 tests/comsub-eof2.sub  f
 tests/comsub-eof3.sub  f
 tests/comsub-eof4.sub  f
+tests/comsub-eof5.sub  f
 tests/comsub-eof.right f
 tests/comsub-posix.tests       f
 tests/comsub-posix.right       f
index 6242c76b21d5ef490783c622b49a55a52f84c1a3..4c212ed6df08849c28a137249338925eeb3e3155 100755 (executable)
@@ -8,6 +8,23 @@ DIR=$PARENT/$FROOT
 TARF=${FROOT}.tar
 SRC=/usr/homes/chet/src/bash/src
 
+fflag= sflag=
+while getopts "fs" opt
+do
+       case $opt in
+       f)      fflag=1 ;;
+       s)      sflag=1 ;;
+       *)      echo "mk-takehome: usage: mk-takehome [-fs]" 2>&1
+               exit 2;;
+       esac
+done
+
+shift $(($OPTIND - 1))
+
+if [ -n "$fflag" ]; then
+       rm -rf "$DIR"
+fi
+
 mkdir $DIR || exit 1
 
 cd $DIR || exit 1
@@ -34,6 +51,6 @@ gzip -v ${TARF}
 
 REMHOST=z4
 
-if [ "$1" = "-s" ]; then
+if [ -n "$sflag" ]; then
        scp ${TARF}.gz ${REMHOST}:
 fi
index 4e1146421da7d2fc91e9d4fab120213671f11b85..452a9c5f0cc8df5bdcd363c7201016f314a4b897 100644 (file)
@@ -7,3 +7,7 @@ hi
 ./comsub-eof3.sub: line 5: syntax error: unexpected end of file
 ./comsub-eof4.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF')
 contents
+./comsub-eof5.sub: line 8: warning: here-document at line 6 delimited by end-of-file (wanted `)')
+hi
+./comsub-eof5.sub: line 13: warning: here-document at line 11 delimited by end-of-file (wanted `EOF')
+hi
index 5980a65f618b4861b5ebe2607d80b41d126e8848..f96aeee945ff2e514cd9ab3b8e2cadde6018802f 100644 (file)
@@ -7,3 +7,5 @@ ${THIS_SH} ./comsub-eof2.sub
 ${THIS_SH} ./comsub-eof3.sub
 
 ${THIS_SH} ./comsub-eof4.sub
+
+${THIS_SH} ./comsub-eof5.sub
diff --git a/tests/comsub-eof5.sub b/tests/comsub-eof5.sub
new file mode 100644 (file)
index 0000000..3da9107
--- /dev/null
@@ -0,0 +1,9 @@
+echo $(
+cat <<\)
+hi
+))
+
+echo $(
+cat <<\EOF
+hi
+EOF)