forked from purescript/purescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·43 lines (32 loc) · 944 Bytes
/
build.sh
File metadata and controls
executable file
·43 lines (32 loc) · 944 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
set -e
SCRIPTPATH=$( cd "$(dirname "$0")" ; pwd -P )
OS=$1
if [ -z $OS ]
then
echo "Usage: build.sh osname"
exit 1
fi
pushd ${SCRIPTPATH} > /dev/null
# Make the staging directory
mkdir -p build/purescript/
# Strip the binaries
strip ../dist/build/psc/psc
strip ../dist/build/psci/psci
strip ../dist/build/psc-make/psc-make
strip ../dist/build/psc-docs/psc-docs
# Copy files to staging directory
cp ../dist/build/psc/psc build/purescript/
cp ../dist/build/psci/psci build/purescript/
cp ../dist/build/psc-make/psc-make build/purescript/
cp ../dist/build/psc-docs/psc-docs build/purescript/
cp README build/purescript/
cp ../LICENSE build/purescript/
# Make the binary bundle
pushd build > /dev/null
tar -zcvf ../$OS.tar.gz purescript
popd > /dev/null
# Calculate the SHA hash
shasum $OS.tar.gz > $OS.sha
# Remove the staging directory
rm -rf build/
popd > /dev/null