bugGNU TeXmacs - Bugs: bug #9803, scripts call for sh, but really...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #9803: scripts call for sh, but really require bash

Submitted by:  None
Submitted on:  Wed 28 Jul 2004 06:33:54 PM UTC  
 
Category: User InterfacePriority: 5 - Normal
Item Group: WishlistStatus: Fixed
Privacy: PublicAssigned to: Denis Raux <denisraux>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 1.0.4
Release: NoneFixed Release: None
Fixed Release: 1.0.7.14
Keywords: 

(Jump to the original submission Jump to the original submission)

Mon 14 Jul 2014 12:13:03 PM UTC, comment #10:

Looks like all the files mentioned below have been updated to use bash => closing.

Miguel de Benito <mdbenito>
Project Member
Fri 09 Mar 2012 05:13:21 PM UTC, comment #9:

No pressure meant, sorry for the phrasing...

Miguel de Benito <mdbenito>
Project Member
Fri 09 Mar 2012 05:12:46 PM UTC, comment #8:

So, are you going to change it in the svn? I'd like to close this bug and the several duplicates.

Miguel de Benito <mdbenito>
Project Member
Thu 08 Mar 2012 01:48:25 PM UTC, comment #7:

I did a grep in the current development release to see how many script files are involved , an i found only one : find . -type f ! -name '.bin' ! -name '.o' ! -name '.tm' -exec grep -qm1 '^#!./sh' {} \; -exec egrep -qm1 --'(\[|test)[^]]* +-e +.*]' {} \; -exec echo {} \;
./cmake/CreateBundle.sh.in

The file tm_gs has already been modified. Same research for bash shell gives ./packages/macos/bundle-libs.sh
./packages/macos/deploy.sh
./plugins/mupad/bin/tm_mupad_help
./TeXmacs/plugins/mupad/bin/tm_mupad_help.

For the future, as said by Alvaro, it would be not necessary to reduce the script writing to a very old shell syntaxe. I will modify the file for the next release.

Denis Raux <denisraux>
Project MemberIn charge of this item.
Thu 08 Mar 2012 11:22:37 AM UTC, comment #6:

Just for info I checked in my dash shell and found test -e to work. It is not clear to me if we should aim to be sh-compliant or POSIX-compliant. From what I gleaned from the internets, sh is not POSIX.2 compliant and I guess we should not bother to support it (there's a wide choice of compliant shells around).

Alvaro Tejero Cantero <alv>
Project Member
Thu 08 Mar 2012 11:00:56 AM UTC, comment #5:

Unfortunatly the '-e' flag doesn't exist in bourne shell. I guess the cygwin1.dll is executable, so you should use -x instead. Else you can use -f for testing the file existence.

Denis Raux <denisraux>
Project MemberIn charge of this item.
Thu 08 Mar 2012 10:58:38 AM UTC, comment #4:

I placed some information I could gather yesterday about the topic on tamiz.

I am happy if Denis wants to take over this one, I would have to get up to speed with shell to do it (plus, the build system is involved). Assigning to Denis to make him aware.

Alvaro Tejero Cantero <alv>
Project Member
Thu 08 Mar 2012 10:54:24 AM UTC, comment #3:

Then Denis is our new winner!! Hello Denis?

Miguel de Benito <mdbenito>
Project Member
Thu 08 Mar 2012 09:40:26 AM UTC, comment #2:

Yes. The shebang should be put to #!/bin/bash when needed, or scripts should be corrected.

At leat, there is a -e test in:

  • packages/macos/bundle-libs.sh
  • packages/macos/deploy.sh

However, I am not a shell guru and I don't know where are possible other incompatibilities with sh.

I think Denis is a shell guru. :)

Francois Poulain <fpoulain>
Project Member
Wed 07 Mar 2012 09:29:57 PM UTC, comment #1:

Is this current, Linux people?

Miguel de Benito <mdbenito>
Project Member
Wed 28 Jul 2004 06:33:54 PM UTC, original submission:

Installing on solaris9/sparc,
scripts like texmacs start with
#!/bin/sh

but have
if [ -e "/usr/bin/cygwin1.dll" ] ; then

which fails since test -e doesn't exist in sh.

bash is really required.

This applies to at least texmacs, tm_gs

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by denisraux (Posted a comment)
  • -unavailable- added by alv (Posted a comment)
  • -unavailable- added by fpoulain
  • -unavailable- added by mdbenito (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 16 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Jul 2014 12:13:03 PM UTCmdbenitoStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 08 Mar 2012 01:48:25 PM UTCdenisrauxFixed Release=>1.0.7.14
    Thu 08 Mar 2012 11:16:47 AM UTCdenisrauxAssigned toalv=>denisraux
    Thu 08 Mar 2012 11:00:56 AM UTCdenisrauxAssigned todenisraux=>alv
    Thu 08 Mar 2012 10:58:38 AM UTCalvCategoryPackaging=>User Interface
      Item GroupError=>Wishlist
      Release1.0.7.14=>1.0.4
    Thu 08 Mar 2012 10:54:24 AM UTCmdbenitoCategoryUser Interface=>Packaging
      Item GroupWishlist=>Error
      Assigned toalv=>denisraux
      Release1.0.4=>1.0.7.14
    Thu 08 Mar 2012 09:40:26 AM UTCfpoulainStatusNeed Info=>Confirmed
      Carbon-Copy-=>Added -unavailable-
    Wed 07 Mar 2012 09:29:57 PM UTCmdbenitoStatusNone=>Need Info
      Assigned toNone=>alv

    Back to the top


    Powered by Savane 3.1-cleanup1