forked from G-Research/ParquetSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcpkg_unix.sh
executable file
·41 lines (37 loc) · 915 Bytes
/
vcpkg_unix.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
#!/bin/bash
set -e
case $(uname) in
Linux)
os=Linux
triplet=x64-linux
;;
Darwin)
os=macOS
triplet=x64-osx
if ! which brew >/dev/null || [ ! -x $(brew --prefix)/opt/bison/bin/bison ]
then
echo 'The version of bison provided with macOS is too old.'
echo 'Please install a newer version with Homebrew (https://brew.sh):'
echo '$ brew install bison'
exit 1
else
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
fi
;;
*)
echo "OS not supported"
exit 1
;;
esac
# Make sure reading vcpkg_version.txt works even when it doesn't end with a newline
read -r vcpkg_url vcpkg_ref << EOF
$(cat vcpkg_version.txt)
EOF
mkdir -p build
cd build
# Clone without checking out a branch, as vcpkg_ref could be a commit SHA
git clone $vcpkg_url vcpkg.$os
cd vcpkg.$os
git checkout $vcpkg_ref
./bootstrap-vcpkg.sh
./vcpkg install arrow:$triplet