dest.o_assignment = NOT_ASSIGNMENT;
}
+ /* Note: nommu_addchr(&ctx.as_string, ch) is already done */
+
switch (ch) {
case '#':
if (dest.length == 0) {
ch = i_getch(input);
if (ch != '\n') {
o_addchr(&dest, '\\');
- nommu_addchr(&ctx.as_string, '\\');
+ /*nommu_addchr(&ctx.as_string, '\\'); - already done */
o_addchr(&dest, ch);
nommu_addchr(&ctx.as_string, ch);
/* Example: echo Hello \2>file
* we need to know that word 2 is quoted */
dest.o_quoted = 1;
+ } else {
+#if !BB_MMU
+ /* It's "\<newline>". Remove trailing '\' from ctx.as_string */
+ ctx.as_string.data[--ctx.as_string.length] = '\0';
+#endif
}
break;
case '$':
tret=0
cd "$1" || { echo "cannot cd $1!"; exit 1; }
for x in run-*; do
- test -f "$x" || continue
- case "$x" in
- "$0"|run-minimal|run-gprof) ;;
- *.orig|*~) ;;
- #*) echo $x ; sh $x ;;
- *)
- sh "$x" >"../$1-$x.fail" 2>&1 && \
- { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail";
- ;;
- esac
+ test -f "$x" || continue
+ case "$x" in
+ "$0"|run-minimal|run-gprof) ;;
+ *.orig|*~) ;;
+ #*) echo $x ; sh $x ;;
+ *)
+ sh "$x" >"../$1-$x.fail" 2>&1 && \
+ { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail";
+ ;;
+ esac
done
# Many bash run-XXX scripts just do this,
# no point in duplication it all over the place