|
From: Jeff T. <je...@so...> - 2000-11-01 15:25:22
|
On Wed, 1 Nov 2000, Finn Bock wrote:
>
> >> Please try the installer and post your experience, both good and bad,
> >> here on the list. Give special attention to the two generated scripts.
> >> With some luck these should work on unixes and windows.
>
> [Jeff Turner]
>
> >Everything went fine (rh6.0, jdk1.2.2), except the two shell scripts
> >(jython and jythonc) were in DOS file format,
>
> Right, I'll fix that.
>
> >and wouldn't execute:
> >
> >~/jython-2.0pa0$ ./jythonc
> >bash: ./jythonc: No such file or directory
>
> This is a bit strange. The script didn't have the execute bit set? The
> installer does a:
> Runtime.getRuntime().exec("chmod 755 " + fullname );
> after creating the scripts. (The old installer did a "chmod 777" but I
> think LiftOff is more correct here). Were there any messages shown in
> the console window where you started the installer?
The execute bits were set:
-rwxr-xr-x 1 jeff jeff 372 Nov 2 02:16 jython
I think what happens is this:
On Unix, EOL corresponds to <LF>. On Windows it corresponds to <CR><LF>.
So when the script is saved in DOS file format, the first line reads:
#!/bin/sh<CR><LF>
The shell reads everything up to EOF *on Unix*, ie <LF>, resulting in:
#!/bin/sh<CR>
It then tries to find the file, and can't because of the <CR>, so it
fails with the error message:
bash: ./jython: No such file or directory
ie, it's saying "there's no file called "/bin/sh<CR>".
Rather nasty :)
--Jeff
>
> regards,
> finn
> _______________________________________________
> Jython-dev mailing list
> Jyt...@li...
> http://lists.sourceforge.net/mailman/listinfo/jython-dev
>
>
|