#!/bin/bash
for f in `ls *.sh` 
do
  if [ "$f" != "macos.sh"  ]; then
    sed -i -e 's#LD_LIBRARY_PATH#DYLD_LIBRARY_PATH#g' $f	
  fi
done
sed -i -e 's#zcat $sourceball | tar xf -#tar xvfz $sourceball#g' download-and-compile.sh
sed -i -e 's#zcat /tmp/$fname | tar xf - -C $installdir#tar xvfz /tmp/$fname -C $installdir#g' dist-src-build.sh
sed -i -e 's#zcat /tmp/$fname | tar xf - -C $installdir#tar xvfz /tmp/$fname -C $installdir#g' dist-tgz.sh
rm *sh-e
echo "Changed all files to be mac os x compliant"

