Results 1 to 4 of 4

Thread: autogen.sh line feed issue

  1. #1

    Default autogen.sh line feed issue

    This might be old news, but...

    On the download page, tgz and zip archives (of version 2.0.2 at least) contain differently encoded line feed in autogen.sh files. In tgz the file uses \n and in zip it uses \r\n as line feed. The latter encoding causes problems when running autogen.sh in Linux (bash):

    $ ./autogen.sh
    bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory.

    Should the zip file work with linux/bash too or should there be some information on the web page about this? (I randomly picked zip first since the archives looked alike)

    First line from both hexdumps for clarification:

    ZIP:
    $ hd autogen.sh
    00000000 23 21 2f 62 69 6e 2f 73 68 0d 0a 0d 0a 65 63 68 |#!/bin/sh....ech|

    TGZ:
    $ hd autogen.sh
    00000000 23 21 2f 62 69 6e 2f 73 68 0a 0a 65 63 68 6f 20 |#!/bin/sh..echo |

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Yes, the ".zip" uses \r\n line feeds and ".tgz" uses \n line feeds

    This is intentional, the ".zip" is for Microsoft Windows, and ".tgz" for Unix.

    Also, the ".zip" file contains some .exe files (eg configure.exe), that the .tgz does not have.

    Yes, the download page should say what the line feeds are.

    Also maybe we should have 2 versions of the ".zip" ; with or without the \r\n line feeds - but I don't think this is necessary.

    (Also somewhere, it should be documented to use "tar -xvzf ClanLib-2.0.2.tgz" - maybe here: http://clanlib.org/docs/clanlib-2.0....linux-gcc.html )

  3. #3
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    I've added some Windows/Linux info on the front page and download page to make it more clear which one one should pick.

  4. #4

    Default

    Wow, quick reaction and good solution, there's hardly room for error anymore

Similar Threads

  1. autogen problem on esoteric
    By Judas in forum Official ClanLib SDK Forums
    Replies: 9
    Last Post: 01-28-2009, 08:42 AM
  2. svn 2240 ClanLib 0.9 autogen.sh error
    By alpharesearch in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 01-21-2009, 09:47 AM
  3. Particles from a line or area?
    By CheshireWhiskers in forum Novashell Game Creation System
    Replies: 4
    Last Post: 05-18-2008, 04:07 PM
  4. More on the green line problem, bug in Clanlib?
    By pTymN in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 03-22-2007, 04:43 PM
  5. Get the feed...
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 10-06-2004, 02:36 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •