@@ -0,0 +1,37 @@
1+set -e
2+
3+SCRIPTPATH=$( cd "$(dirname "$0")" ; pwd -P )
4+
5+OS=$( uname )
6+
7+pushd ${SCRIPTPATH} > /dev/null
8+
9+# Make the staging directory
10+mkdir -p build/purescript/
11+
12+# Strip the binaries
13+strip ../dist/build/psc/psc
14+strip ../dist/build/psci/psci
15+strip ../dist/build/psc-make/psc-make
16+strip ../dist/build/docgen/docgen
17+
18+# Copy files to staging directory
19+cp ../dist/build/psc/psc build/purescript/
20+cp ../dist/build/psci/psci build/purescript/
21+cp ../dist/build/psc-make/psc-make build/purescript/
22+cp ../dist/build/docgen/docgen build/purescript/
23+cp ../prelude/prelude.purs build/purescript/
24+cp install.sh build/purescript/
25+
26+# Make the binary bundle
27+pushd build > /dev/null
28+tar -zcvf ../$OS.tar.gz purescript
29+popd > /dev/null
30+
31+# Calculate the SHA hash
32+shasum $OS.tar.gz > $OS.sha
33+
34+# Remove the staging directory
35+rm -rf build/
36+
37+popd > /dev/null