bin/mklib: Clear CDPATH to avoid damaging expand_archive output
authorKeith Packard <keithp@keithp.com>
Sun, 21 Feb 2010 22:30:00 +0000 (14:30 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 22 Feb 2010 17:56:58 +0000 (09:56 -0800)
The bash 'cd' command tends to emit random stuff to stdout when the
CDPATH variable is set, so clear it to keep extra filenames from being
emitted from the expand_archive function, which would otherwise cause
mklib to fail.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
bin/mklib

index 06e8029..7f22725 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
+# Clear CDPATH as the 'cd' command will echo stuff
+# to stdout if it is set
+unset CDPATH
+
 # Given a list of files, look for .a archives and unpack them.
 # Return the original list of files minus the .a files plus the unpacked files.
 # first param:  name of a temp directory (to be deleted when finished)