All of lore.kernel.org
 help / color / mirror / Atom feed
* contrib/thunderbird-patch-inline: do not require /bin/bash to run
@ 2011-03-29  7:08 Maxin john
  2011-03-30 17:43 ` Drew Northup
  0 siblings, 1 reply; 3+ messages in thread
From: Maxin john @ 2011-03-29  7:08 UTC (permalink / raw)
  To: Git Mailing List
  Cc: Junio C Hamano, Ángel González, Lukas Sandström

contrib/thunderbird-patch-inline: do not require /bin/bash to run

Modified the patch by incorporating the suggestions from Ángel
González <ingenit@zoho.com> and Junio C Hamano <gitster@pobox.com>

Signed-off-by: Maxin B. John <maxin@maxinbjohn.info>
---
diff --git a/contrib/thunderbird-patch-inline/appp.sh
b/contrib/thunderbird-patch-inline/appp.sh
index cc518f3..1d109a5 100755
--- a/contrib/thunderbird-patch-inline/appp.sh
+++ b/contrib/thunderbird-patch-inline/appp.sh
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/bin/sh
 # Copyright 2008 Lukas Sandström <luksan@gmail.com>
 #
 # AppendPatch - A script to be used together with ExternalEditor
-# for Mozilla Thunderbird to properly include pathes inline i e-mails.
+# for Mozilla Thunderbird to properly include patches inline in e-mails.

 # ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2

@@ -16,7 +16,12 @@ else
        cd > /dev/null
 fi

-PATCH=$(zenity --file-selection)
+#check whether zenity is present
+if ! type zenity >/dev/null 2>&1 ; then
+       exit 1
+fi
+
+PATCH=`zenity --file-selection`

 if [ "$?" != "0" ] ; then
        #zenity --error --text "No patchfile given."

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

* Re: contrib/thunderbird-patch-inline: do not require /bin/bash to run
  2011-03-29  7:08 contrib/thunderbird-patch-inline: do not require /bin/bash to run Maxin john
@ 2011-03-30 17:43 ` Drew Northup
  2011-03-30 18:53   ` Drew Northup
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Northup @ 2011-03-30 17:43 UTC (permalink / raw)
  To: Maxin john
  Cc: Git Mailing List, Junio C Hamano, Ángel González,
	Lukas Sandström


On Tue, 2011-03-29 at 10:08 +0300, Maxin john wrote:
> contrib/thunderbird-patch-inline: do not require /bin/bash to run
> 
> Modified the patch by incorporating the suggestions from Ángel
> González <ingenit@zoho.com> and Junio C Hamano <gitster@pobox.com>
> 
> Signed-off-by: Maxin B. John <maxin@maxinbjohn.info>
> ---
> diff --git a/contrib/thunderbird-patch-inline/appp.sh
> b/contrib/thunderbird-patch-inline/appp.sh
> index cc518f3..1d109a5 100755
> --- a/contrib/thunderbird-patch-inline/appp.sh
> +++ b/contrib/thunderbird-patch-inline/appp.sh
> @@ -1,8 +1,8 @@
> -#!/bin/bash
> +#!/bin/sh
>  # Copyright 2008 Lukas Sandström <luksan@gmail.com>
>  #
>  # AppendPatch - A script to be used together with ExternalEditor
> -# for Mozilla Thunderbird to properly include pathes inline i e-mails.
> +# for Mozilla Thunderbird to properly include patches inline in e-mails.
> 
>  # ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
> 
> @@ -16,7 +16,12 @@ else
>         cd > /dev/null
>  fi
> 
> -PATCH=$(zenity --file-selection)
> +#check whether zenity is present
> +if ! type zenity >/dev/null 2>&1 ; then
> +       exit 1
> +fi
> +
> +PATCH=`zenity --file-selection`

I could be missing something, but I thought we were trying to
standardize to the $(....) syntax..., no? I didn't think that was a
bash-ism.

>  if [ "$?" != "0" ] ; then
>         #zenity --error --text "No patchfile given."

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

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

* Re: contrib/thunderbird-patch-inline: do not require /bin/bash to run
  2011-03-30 17:43 ` Drew Northup
@ 2011-03-30 18:53   ` Drew Northup
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Northup @ 2011-03-30 18:53 UTC (permalink / raw)
  To: Maxin john
  Cc: Git Mailing List, Junio C Hamano, Ángel González,
	Lukas Sandström

You can ignore this, I hadn't found the new thread yet....

On Wed, 2011-03-30 at 13:43 -0400, Drew Northup wrote:
> On Tue, 2011-03-29 at 10:08 +0300, Maxin john wrote:
> > contrib/thunderbird-patch-inline: do not require /bin/bash to run
> > 
> > Modified the patch by incorporating the suggestions from Ángel
> > González <ingenit@zoho.com> and Junio C Hamano <gitster@pobox.com>
> > 
> > Signed-off-by: Maxin B. John <maxin@maxinbjohn.info>
> > ---
> > diff --git a/contrib/thunderbird-patch-inline/appp.sh
> > b/contrib/thunderbird-patch-inline/appp.sh
> > index cc518f3..1d109a5 100755
> > --- a/contrib/thunderbird-patch-inline/appp.sh
> > +++ b/contrib/thunderbird-patch-inline/appp.sh
> > @@ -1,8 +1,8 @@
> > -#!/bin/bash
> > +#!/bin/sh
> >  # Copyright 2008 Lukas Sandström <luksan@gmail.com>
> >  #
> >  # AppendPatch - A script to be used together with ExternalEditor
> > -# for Mozilla Thunderbird to properly include pathes inline i e-mails.
> > +# for Mozilla Thunderbird to properly include patches inline in e-mails.
> > 
> >  # ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
> > 
> > @@ -16,7 +16,12 @@ else
> >         cd > /dev/null
> >  fi
> > 
> > -PATCH=$(zenity --file-selection)
> > +#check whether zenity is present
> > +if ! type zenity >/dev/null 2>&1 ; then
> > +       exit 1
> > +fi
> > +
> > +PATCH=`zenity --file-selection`
> 
> I could be missing something, but I thought we were trying to
> standardize to the $(....) syntax..., no? I didn't think that was a
> bash-ism.
> 
> >  if [ "$?" != "0" ] ; then
> >         #zenity --error --text "No patchfile given."

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

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

end of thread, other threads:[~2011-03-30 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-29  7:08 contrib/thunderbird-patch-inline: do not require /bin/bash to run Maxin john
2011-03-30 17:43 ` Drew Northup
2011-03-30 18:53   ` Drew Northup

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.