Chris Knadle wrote:
Yeah another interesting thing I've been running into concerning bash scripts
are "Bash-isms"; because the default shell in Debian these days for package
installation and /bin/sh (used for Cronjobs) is Dash -- not Bash.
http://en.wikipedia.org/wiki/Debian_Almquist_shell
There are some interesting differences, such as the lack of the "==" test,
lack of "for" loops, etc.
http://princessleia.com/plug/2008-JP_bash_vs_dash.pdf
I can see the sense of a smaller default shell intended for use by the
system at least, although I have to say from the back seat here, I find
myself wondering what was saved at the cost of so many differences from
Bash. Not everything in Bash is bloat, and I guess I fail to appreciate
why enforcing POSIX compatibility in scripts to be run on a Debian
system is raised to such a priority over the kind of compatibility I can
appreciate. One thing I am good about though is I *always* put
#!/bin/bash in when I write a Bash script. Probably some of the scripts
I write are compatible with with the /bin/sh du jour, but I don't need
to know, I write these for myself.
From the above document I just found out there's a program 'checkbashisms'
that helps with these things that's part of the 'devscripts' package.
I had at one point, read the New Maintainer's Guide and the Debian
Policy Manual. Must have been seven years ago though. My recollection
though is that while there was plenty of things one had to do in a text
editor, there were a lot of tools that helped create everything from the
directory structure and its contents, to the actual package itself.
Become a Debian Developer. You can sponsor my package! ;)
- Ron
_______________________________________________
Mid-Hudson Valley Linux Users Group http://mhvlug.org
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug
Upcoming Meetings (6pm - 8pm) MHVLS Auditorium
Sep 1 - BOINC
Oct 6 - Creating Firefox Extensions
Nov 3 - Bug Labs