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

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

From
Drew Northup <drew.northup@maine.edu>
Date
Mar 30, 2011, 17:43 UTC
Message-ID
<1301507039.22607.33.camel@drew-northup.unet.maine.edu>
In-Reply-To
<AANLkTinUh0BX3O+2Y1CiUTx7xvzW6ydrAGiGQUx4pbeP@mail.gmail.com>
On Tue, 2011-03-29 at 10:08 +0300, Maxin john wrote:
Show 34 quoted lines
> 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
Previous: Maxin johnNext: Drew Northup
Message 2 of 3 in “contrib/thunderbird-patch-inline: do not require /bin/bash to run”
  1. Maxin johnMar 29, 2011
  2. Drew NorthupMar 30, 2011
  3. Drew NorthupMar 30, 2011

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.