git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] guilt(1): Obvious bashisms fixed.

From
Pierre Habouzit <madcoder@debian.org>
Date
Jun 14, 2007, 15:18 UTC
Message-ID
<20070614151834.GL23324@artemis>
In-Reply-To
<20070614151512.GB934@filer.fsl.cs.sunysb.edu>
On Thu, Jun 14, 2007 at 11:15:12AM -0400, Josef Sipek wrote:
Show 35 quoted lines
> On Thu, Jun 14, 2007 at 02:50:57PM +0200, Pierre Habouzit wrote:
> >   + function foo { } -> foo() { }
> >   + add wrapper for echo -e
> >   + couple of '[' bashisms
> >   + get rid of easy local variables to remove
> >   + avoid cd - (using subshells)
> .... 
> 
> Just a small nit-pick :)
> 
> > diff --git a/guilt b/guilt
> > index 2ae76f8..80f3faf 100755
> > --- a/guilt
> > +++ b/guilt
> > @@ -20,7 +20,29 @@ SUBDIRECTORY_OK=1
> ....
> > +guilt_commands()
> >  {
> >  	local command
> >  	for command in $0-*
> > @@ -32,7 +54,7 @@ function guilt_commands
> >  	done
> >  }
> >  
> > -if [ `basename $0` = "guilt" ]; then
> > +if [ "`basename $0`" = "guilt" ]; then
> 
> You added quotes here - that's ok....
> 
> >  	# being run as standalone
> >  
> >  	# by default, we shouldn't fail
> > @@ -58,7 +80,7 @@ if [ `basename $0` = "guilt" ]; then
> 
> But did not add them here.... :)
  heh, I tried my best, I've no automated tool for that, only my eyes
and thise code will break iff `basename $0` has spaces in it, which is
rather crazy anyways. But you're welcome to add the missing ones *sigh*
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Josef SipekNext: Pierre Habouzit
Message 5 of 22 in “make guilt use standard POSIX shell”
  1. make guilt use standard POSIX shellPierre Habouzit, Jun 14, 2007
  2. Regression test suite needs bash, that's OK.Pierre Habouzit, Jun 14, 2007
  3. guilt(1): Obvious bashisms fixed.Pierre Habouzit, Jun 14, 2007
  4. Josef SipekJun 14, 2007
  5. Pierre HabouzitJun 14, 2007
  6. guilt(1): simplifications...Pierre Habouzit, Jun 14, 2007
  7. Josef SipekJun 14, 2007
  8. Pierre HabouzitJun 14, 2007
  9. guilt(1): reimplement push_patch, using a subshell to avoid locals.Pierre Habouzit, Jun 14, 2007
  10. Easy commands, without bashisms.Pierre Habouzit, Jun 14, 2007
  11. guilt-status(1): Remove bashisms.Pierre Habouzit, Jun 14, 2007
  12. Remove last bashisms from remaining commands.Pierre Habouzit, Jun 14, 2007
  13. Pierre HabouzitJun 14, 2007
  14. Small regresson when series file is empty.Pierre Habouzit, Jun 14, 2007
  15. Josef SipekJun 14, 2007
  16. Pierre HabouzitJun 14, 2007
  17. Pierre HabouzitJun 14, 2007
  18. Josef SipekJun 14, 2007
  19. Pierre HabouzitJun 14, 2007
  20. More regressions fixes.Pierre Habouzit, Jun 14, 2007
  21. Derek FawcusJun 15, 2007
  22. Benjamin SergeantJun 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.