Closed GoogleCodeExporter closed 8 years ago
Thanks for running that checker.
http://www.in-ulm.de/~mascheck/various/echo+printf/ has a great chart
showing what systems don't support echo -n. Solaris is listed.
We need to replace echo -n with printf %s carefully.
The two lines that use trap numbers and test -a also need fixing.
Original comment by daniel.r...@gmail.com
on 5 Mar 2011 at 4:02
On Mac OS 10.6, #!/bin/sh gets a compatibility mode where the shell-builtin
echo does not support "echo -n".
As a result, winetricks is unusable:
% winetricks apps
/tmp/w.jeff.54607/zenity.sh: line 1: -n: command not found
/tmp/w.jeff.54607/zenity.sh: line 2: -n: command not found
/tmp/w.jeff.54607/zenity.sh: line 3: -n: command not found
/tmp/w.jeff.54607/zenity.sh: line 4: -n: command not found
[ ... ]
Simply changing the first line to #!/bin/bash makes it all better.
Original comment by jm...@cornell.edu
on 21 Mar 2011 at 3:29
Alternatively, using "/bin/echo" in place of "echo" would work as well.
Original comment by jm...@cornell.edu
on 21 Mar 2011 at 3:50
Thanks!
Original comment by daniel.r...@gmail.com
on 21 Mar 2011 at 6:44
Issue 8 has been merged into this issue.
Original comment by daniel.r...@gmail.com
on 21 Mar 2011 at 6:45
r348 uses printf %s instead of echo -n, should make things work better on mac.
Original comment by daniel.r...@gmail.com
on 23 Mar 2011 at 12:13
I tried the one with prinftf %s from svn ... it seems to be working fine for me
now!
Original comment by doh...@gmail.com
on 23 Mar 2011 at 1:35
To explain why I chose printf:
#!/bin/bash would not help keep the script portable, could break it on some
systems. I prefer to stay with posix.
/bin/echo is a bit of a gamble, too, since some systems might place it in
/usr/bin.
winetricks already uses printf, so that seemed like the right way to get rid of
echo -n.
Original comment by daniel.r...@gmail.com
on 24 Mar 2011 at 3:07
Trap and test -a fixed as of r355. "checkbashims -p -x winetricks" now clean.
Original comment by daniel.r...@gmail.com
on 24 Mar 2011 at 3:58
Original issue reported on code.google.com by
jari.aalto.fi@gmail.com
on 5 Mar 2011 at 12:40