git.iko.soy/rowtype-yoga/purescript-native
on e5f034d help sign in
50 lines 1.2 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 ~/.local/bin/psc
20strip ~/.local/bin/psci
21strip ~/.local/bin/psc-docs
22strip ~/.local/bin/psc-publish
23strip ~/.local/bin/psc-bundle
24strip ~/.local/bin/psc-ide-server
25strip ~/.local/bin/psc-ide-client
27# Copy files to staging directory
28cp ~/.local/bin/psc build/purescript/
29cp ~/.local/bin/psci build/purescript/
30cp ~/.local/bin/psc-docs build/purescript/
31cp ~/.local/bin/psc-publish build/purescript/
32cp ~/.local/bin/psc-bundle build/purescript/
33cp ~/.local/bin/psc-ide-server build/purescript/
34cp ~/.local/bin/psc-ide-client build/purescript/
35cp README build/purescript/
36cp ../LICENSE build/purescript/
37cp ../INSTALL.md build/purescript/
39# Make the binary bundle
40pushd build > /dev/null
41tar -zcvf ../$OS.tar.gz purescript
42popd > /dev/null
44# Calculate the SHA hash
45shasum $OS.tar.gz > $OS.sha
47# Remove the staging directory
48rm -rf build/
50popd > /dev/null