-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
executable file
·54 lines (37 loc) · 1.13 KB
/
build.sh
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
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -e # Stop as soon as a command fails.
set -x # Print what is being executed.
pwd
VFDEPS_VERSION=`git describe --always`
VFDEPS_DIRNAME=vfdeps-$VFDEPS_VERSION
BUILD_DIR=`pwd`
mkdir -p upload
UPLOAD_DIR=$BUILD_DIR/upload
if [ $(uname -s) = "Linux" ]; then
VFDEPS_PARENT_DIR=/tmp
VFDEPS_PLATFORM=linux
VFDEPS_DIR=$VFDEPS_PARENT_DIR/$VFDEPS_DIRNAME
make PREFIX=$VFDEPS_DIR
elif [ $(uname -s) = "Darwin" ]; then
VFDEPS_PARENT_DIR=/usr/local
if [ "$(uname -p)" = arm ]; then
VFDEPS_PLATFORM=macos-aarch64
else
VFDEPS_PLATFORM=macos
fi
VFDEPS_DIR=$VFDEPS_PARENT_DIR/$VFDEPS_DIRNAME
sudo mkdir $VFDEPS_DIR
sudo chown -R $(whoami):admin /usr/local/*
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
make PREFIX=$VFDEPS_DIR
else
echo "Your OS is not supported by this script. For Windows, see verifast/vfdeps-win."
exit 1
fi
VFDEPS_FILENAME=$VFDEPS_DIRNAME-$VFDEPS_PLATFORM.txz
VFDEPS_FILEPATH=$UPLOAD_DIR/$VFDEPS_FILENAME
cd $VFDEPS_PARENT_DIR
tar cjf $VFDEPS_FILEPATH $VFDEPS_DIRNAME
cd $BUILD_DIR
ls -l $VFDEPS_FILEPATH
shasum -a 224 $VFDEPS_FILEPATH