make-zip.sh 579 B

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