summaryrefslogtreecommitdiffstats
path: root/Tools/CygwinDownloader/make-zip.sh
blob: 4a389a9de084340faf41a70268f8ff78ad70a23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

PYTHONEXE=$(cygpath -u "${SYSTEMDRIVE}\\Python25\\python.exe")
ZIPNAME="cygwin-downloader.zip"

if [[ ! -f "${PYTHONEXE}" ]]; then
        echo "Couldn't find python.exe at ${PYTHONEXE}" 1>&2
        exit 1
fi

"${PYTHONEXE}" setup.py py2exe || {
        echo "Failed executing setup.py" 1>&2
        exit 1
}

rm -f "${ZIPNAME}"

cd dist

zip -r ../"${ZIPNAME}" * || {
        echo "Failed to create cygwin-downloader" 1>&2
        exit 1
}

cd ..

rm -rf build dist || {
        echo "Failed to cleanup cygwin-downloader and build directories" 1>&2
        exit 1
}