1#!/bin/sh 2 3PYTHONEXE=$(cygpath -u "${SYSTEMDRIVE}\\Python25\\python.exe") 4ZIPNAME="cygwin-downloader.zip" 5 6if [[ ! -f "${PYTHONEXE}" ]]; then 7 echo "Couldn't find python.exe at ${PYTHONEXE}" 1>&2 8 exit 1 9fi 10 11"${PYTHONEXE}" setup.py py2exe || { 12 echo "Failed executing setup.py" 1>&2 13 exit 1 14} 15 16rm -f "${ZIPNAME}" 17 18cd dist 19 20zip -r ../"${ZIPNAME}" * || { 21 echo "Failed to create cygwin-downloader" 1>&2 22 exit 1 23} 24 25cd .. 26 27rm -rf build dist || { 28 echo "Failed to cleanup cygwin-downloader and build directories" 1>&2 29 exit 1 30} 31