#!/bin/bash
exit 0
DST=${BUILD_ROOT}/32${MINGW32_SYSROOT}mingw/
pushd ${DST}bin

for i in bzcat bzip2 bunzip2 bzip2recover; do
	mv $i $i.exe;
done
# These are symlinks, which Windows doesn't know anything about
rm -f bzcmp bzegrep bzfgrep bzless
cp bzdiff bzcmp
cp bzgrep bzegrep
cp bzgrep bzfgrep
cp bzmore bzless
popd

# Makefile fails to install the DLL file
pushd build-32

mkdir -p ../${DST}lib
install libbz2.dll.a ../${DST}lib
mkdir -p ../${DST}bin
install bz2-1.dll ../${DST}bin

popd

# Remove the static version of the library
rm ${DST}lib/libbz2.a

# Move the man directory to the correct location
mkdir -p ${DST}share
mv -t ${DST}share ${DST}man
