git.iko.soy/rowtype-yoga/purescript-native
on 24fdff2 help sign in
46 lines 1.1 kB history raw
1set -e
3SCRIPTPATH=$( cd "$(dirname "$0")" ; pwd -P )
5OS=$1
7if [ -z $OS ]
8then
9 echo "Usage: build.sh osname"
10 exit 1
11fi
13pushd ${SCRIPTPATH} > /dev/null
15# Make the staging directory
16mkdir -p build/purescript/
18# Strip the binaries
19strip ../dist/build/psc/psc
20strip ../dist/build/psci/psci
21strip ../dist/build/psc-docs/psc-docs
22strip ../dist/build/psc-publish/psc-publish
23strip ../dist/build/psc-bundle/psc-bundle
25# Copy files to staging directory
26cp ../dist/build/psc/psc build/purescript/
27cp ../dist/build/psci/psci build/purescript/
28cp ../dist/build/psc-docs/psc-docs build/purescript/
29cp ../dist/build/psc-publish/psc-publish build/purescript/
30cp ../dist/build/psc-bundle/psc-bundle build/purescript/
31cp README build/purescript/
32cp ../LICENSE build/purescript/
33cp ../INSTALL.md build/purescript/
35# Make the binary bundle
36pushd build > /dev/null
37tar -zcvf ../$OS.tar.gz purescript
38popd > /dev/null
40# Calculate the SHA hash
41shasum $OS.tar.gz > $OS.sha
43# Remove the staging directory
44rm -rf build/
46popd > /dev/null