Re: [PATCH] guilt(1): Obvious bashisms fixed.
On Thu, Jun 14, 2007 at 02:50:57PM +0200, Pierre Habouzit wrote:
Show 5 quoted lines
> + 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 :)
Show 5 quoted lines
> diff --git a/guilt b/guilt
> index 2ae76f8..80f3faf 100755
> --- a/guilt
> +++ b/guilt
> @@ -20,7 +20,29 @@ SUBDIRECTORY_OK=1
Show 10 quoted lines
> +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" ]; thenYou 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.... :)
Josef "Jeff" Sipek.
--
A CRAY is the only computer that runs an endless loop in just 4 hours...