2022-06-19 14:57:37 -04:00
|
|
|
#!/bin/bash
|
2023-09-04 21:46:54 -04:00
|
|
|
MEEK_TAG=v0.38.0
|
2022-06-19 14:57:37 -04:00
|
|
|
|
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
|
2024-08-23 06:28:20 -04:00
|
|
|
git clone https://gitlab.torproject.org/tpo/anti-censorship/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
|