Busted generic build script?

Harold L Hunt II huntharo@msu.edu
Thu Mar 18 22:30:00 GMT 2004


I have been having trouble with unmodified copies of the most recent 
generic build script.

Symptoms
========
The build script just doesn't work, it does *nothing* it always produces 
an error... it basically doesn't parse right due to the install_docs 
variable.  Removing all entries from install_docs that the shell 
complains about results in a script that runs, but it silently fails to 
install any of the listed document names during the install step.

Attached is an example that reproduces the problem.

Steps to reproduce
==================
1) Save files to a directory
2) tar xjf foo-1.0.tar.bz2
3) ./foo-1.0-1.sh mkdirs
4) Observe the following output:
export: BUG-REPORTS: bad variable name

I think the following analysis is telling:
1) Run these commands in a bash shell:
export install_docs="ABOUT-NLS"
export install_docs=`for i in ${install_docs}; do echo $i; done | sort -u`
set | grep install_docs

2) Observe the output:
install_docs=ABOUT-NLS

3) Run these commands in a bash shell:
export install_docs="ABOUT-NLS FOO"
export install_docs=`for i in ${install_docs}; do echo $i; done | sort -u`
set | grep install_docs

4) Observe the output:
install_docs=$'ABOUT-NLS\nFOO'

Possible Solution
=================
It seems to me that the sorting of the install_docs list is pretty 
useless since this is a static list that might be updated once or twice 
during the development of a package.  Removing the sorting step removes 
both symptoms described above.  Of course, any other solution that also 
fixes the problem is acceptable to me.

Harold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo-1.0.tar.bz2
Type: application/octet-stream
Size: 157 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20040318/b64b6a99/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo-1.0-1.sh
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20040318/b64b6a99/attachment.ksh>


More information about the Cygwin-apps mailing list