mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* hush fixes and cleanups
@ 2012-04-30 11:19 Sascha Hauer
  2012-04-30 11:19 ` [PATCH 01/13] hush: safe indention level by continueing a loop Sascha Hauer
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Sascha Hauer @ 2012-04-30 11:19 UTC (permalink / raw)
  To: barebox

The following series generally cleans up the hush code and fixes
some longstanding bugs.

Since busybox hush has evolved a lot (looks completely different than
our version) and U-Boots hush version does not evolve much (so no useful
commits there) it's no longer worth to keep the original coding style,
so this series cleans up the coding style making it better readable.

Also some longstanding bugs are fixed. It is now possible to echo ' and "
to the console. These quotes were either removed or were printed with
the preceeding \ to the console. Also the quotes from the stream are now
removed at the end of parsing which means that a

me=sascha; echo "hello $me"

now correctly passed as

argv[1] = "hello sascha"

instead of

argv[1] = "hello", argv[2] = "sascha".

Also the bug that hush expands glob wildcards at the beginning of a
script instead of right before executing a command is fixed. This
makes the 'hush hack' script in the default environment unnecessary.

Sascha

----------------------------------------------------------------
Sascha Hauer (13):
      hush: safe indention level by continueing a loop
      hush: safe an indention level by continueing a loop
      hush: cleanup coding style
      hush: remove bogus 'else'
      hush: run_pipe_real must have num_progs == 1
      hush: run_pipe_real: bail out early to safe an indention level
      hush: remove quotes at end of processing
      hush: simplify globhack
      hush: pass GLOB_NOCHECK to glob
      glob: activate GLOB_NOCHECK flag
      hush: Fix globbing
      hush: allow to run interactive shell in do_sh
      defaultenv: remove now unnecessary hush-hack

 common/hush.c            |  779 ++++++++++++++++++++++++++++------------------
 defaultenv/bin/hush_hack |    1 -
 defaultenv/bin/init      |    5 +-
 lib/glob.c               |   10 +-
 4 files changed, 476 insertions(+), 319 deletions(-)
 delete mode 100644 defaultenv/bin/hush_hack

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-04-30 11:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30 11:19 hush fixes and cleanups Sascha Hauer
2012-04-30 11:19 ` [PATCH 01/13] hush: safe indention level by continueing a loop Sascha Hauer
2012-04-30 11:19 ` [PATCH 02/13] hush: safe an " Sascha Hauer
2012-04-30 11:19 ` [PATCH 03/13] hush: cleanup coding style Sascha Hauer
2012-04-30 11:19 ` [PATCH 04/13] hush: remove bogus 'else' Sascha Hauer
2012-04-30 11:19 ` [PATCH 05/13] hush: run_pipe_real must have num_progs == 1 Sascha Hauer
2012-04-30 11:19 ` [PATCH 06/13] hush: run_pipe_real: bail out early to safe an indention level Sascha Hauer
2012-04-30 11:19 ` [PATCH 07/13] hush: remove quotes at end of processing Sascha Hauer
2012-04-30 11:19 ` [PATCH 08/13] hush: simplify globhack Sascha Hauer
2012-04-30 11:19 ` [PATCH 09/13] hush: pass GLOB_NOCHECK to glob Sascha Hauer
2012-04-30 11:19 ` [PATCH 10/13] glob: activate GLOB_NOCHECK flag Sascha Hauer
2012-04-30 11:19 ` [PATCH 11/13] hush: Fix globbing Sascha Hauer
2012-04-30 11:19 ` [PATCH 12/13] hush: allow to run interactive shell in do_sh Sascha Hauer
2012-04-30 11:19 ` [PATCH 13/13] defaultenv: remove now unnecessary hush-hack Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox