Rob Landley <rland...@parallels.com> writes: > On 02/16/2011 11:23 PM, Trent W. Buck wrote: >> PS: instead of HTML=$(echo $i | sed 's/\.sgml\.in$/.html/') try >> HTML="${i%.sgml.in}.html". See PATTERN SUBSTITUTIONS in the bash >> manpage, though this is POSIX portable sh. > > Last I checked Ubuntu's Defective Annoying SHell didn't support that > construct, but I believe make's patsubst should be portable enough.
It's not Ubuntu's: $ man dash <&- | grep -A4 HISTORY HISTORY dash is a POSIX-compliant implementation of /bin/sh that aims to be as small as possible. dash is a direct descendant of the NetBSD version of ash (the Almquist SHell), ported to Linux in early 1997. It was renamed to dash in 2002. It does work: $ dash -c 'x=foo.bar.baz; echo $x ${x%.*} ${x%%.*} ${x#*.} ${x##*.}' foo.bar.baz foo.bar foo bar.baz baz Named traps don't work in dash, and echo -n is provided. AFAIK, dash is otherwise compatible with POSIX 2008: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html See also posh (Policy-compliant Ordinary SHell). If you want bash, bloody well use a bash shebang. > I'm a little reluctant to add a URL to the makefile because the rest of > the build doesn't currently require network access, but I don't see a > better alternative... You don't need to make it part of the default "make; make install" sequence. Just put it there, and IF people want HTML, they can run "make html" as well. (Also, if you meet the dependencies locally, you don't need network access -- I think.) ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel