2022-06-19 14:57:37 -04:00
|
|
|
#!/bin/bash
|
|
|
|
MEEK_TAG=v0.37.0
|
|
|
|
|
2022-12-30 16:23:52 -05:00
|
|
|
OS=$(uname -s)
|
|
|
|
|
2022-06-19 14:57:37 -04:00
|
|
|
mkdir -p ./build/meek
|
|
|
|
cd ./build/meek
|
2022-12-30 16:23:52 -05:00
|
|
|
git clone https://git.torproject.org/pluggable-transports/meek.git || echo "already cloned"
|
2022-06-19 14:57:37 -04:00
|
|
|
cd meek
|
|
|
|
git checkout $MEEK_TAG
|
2022-12-30 16:23:52 -05:00
|
|
|
|
|
|
|
if [ "$OS" == "Darwin" ]; then
|
2023-02-06 21:31:02 -05:00
|
|
|
if [[ $(uname -m) == 'arm64' ]]; then
|
|
|
|
go build -o ../../../onionshare/resources/tor/meek-client-arm64 ./meek-client
|
|
|
|
GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/meek-client-amd64 ./meek-client
|
|
|
|
lipo -create -output ../../../onionshare/resources/tor/meek-client ../../../onionshare/resources/tor/meek-client-arm64 ../../../onionshare/resources/tor/meek-client-amd64
|
|
|
|
rm ../../../onionshare/resources/tor/meek-client-arm64 ../../../onionshare/resources/tor/meek-client-amd64
|
|
|
|
elif [[ $(uname -m) == 'x86_64' ]]; then
|
|
|
|
go build -o ../../../onionshare/resources/tor/meek-client ./meek-client
|
|
|
|
fi
|
2022-12-30 16:23:52 -05:00
|
|
|
else
|
|
|
|
go build -o ../../../onionshare/resources/tor/meek-client ./meek-client
|
|
|
|
fi
|