summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2020-05-12 14:38:45 +0200
committerLinus Färnstrand <linus@mullvad.net>2020-05-13 12:25:16 +0200
commitb85c98850c1b3c611a8cb6cacdfd7c5b8270290e (patch)
tree0f246bca7710d1bbedb647ea8a9712e25a2b90e8
parent3fba0cc29b9f9ee88cfc2202271fe56acc12cfca (diff)
downloadmullvadvpn-b85c98850c1b3c611a8cb6cacdfd7c5b8270290e.tar.xz
mullvadvpn-b85c98850c1b3c611a8cb6cacdfd7c5b8270290e.zip
Don't source env.sh for Android
-rwxr-xr-xbuild-apk.sh1
-rwxr-xr-xbuild.sh2
-rwxr-xr-xci/ci-rust-script.sh2
-rwxr-xr-xenv.sh32
-rwxr-xr-xprepare_release.sh2
5 files changed, 14 insertions, 25 deletions
diff --git a/build-apk.sh b/build-apk.sh
index 8f1a8b9998..47c47c024d 100755
--- a/build-apk.sh
+++ b/build-apk.sh
@@ -87,7 +87,6 @@ for ARCHITECTURE in $ARCHITECTURES; do
esac
echo "Building mullvad-daemon for $TARGET"
- source env.sh "$TARGET"
cargo +stable build $CARGO_ARGS --target "$TARGET" --package mullvad-jni
cp -a "$SCRIPT_DIR/dist-assets/binaries/$TARGET" "$SCRIPT_DIR/android/build/extraJni/$ABI"
diff --git a/build.sh b/build.sh
index 482ba2d385..de58aff5ed 100755
--- a/build.sh
+++ b/build.sh
@@ -17,7 +17,7 @@ RUSTC_VERSION=`rustc +stable --version`
PRODUCT_VERSION=$(node -p "require('./gui/package.json').version" | sed -Ee 's/\.0//g')
CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-"$SCRIPT_DIR/target"}
-source env.sh ""
+source env.sh
if [[ "${1:-""}" != "--dev-build" ]]; then
BUILD_MODE="release"
diff --git a/ci/ci-rust-script.sh b/ci/ci-rust-script.sh
index 9df86c0f39..f6f6b4f51f 100755
--- a/ci/ci-rust-script.sh
+++ b/ci/ci-rust-script.sh
@@ -5,7 +5,7 @@ set -eux
RUST_TOOLCHAIN_CHANNEL=$1
export RUSTFLAGS="--deny unused_imports --deny dead_code --deny unused_mut --deny unused_variables --deny unused_parens"
-source env.sh ""
+source env.sh
case "$(uname -s)" in
Linux*|Darwin*)
diff --git a/env.sh b/env.sh
index 27957509b4..ea60f3781b 100755
--- a/env.sh
+++ b/env.sh
@@ -2,29 +2,19 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-if [ -n "$1" ]; then
- TARGET="$1"
-else
- TARGET=""
-fi
-
-if [ -z "$TARGET" ]; then
- case "$(uname -s)" in
- Linux*)
- TARGET="x86_64-unknown-linux-gnu"
- ;;
- Darwin*)
- TARGET="x86_64-apple-darwin"
- ;;
- MINGW*|MSYS_NT*)
- TARGET="x86_64-pc-windows-msvc"
- ;;
- esac
-fi
+case "$(uname -s)" in
+ Linux*)
+ TARGET="x86_64-unknown-linux-gnu"
+ ;;
+ Darwin*)
+ TARGET="x86_64-apple-darwin"
+ ;;
+ MINGW*|MSYS_NT*)
+ TARGET="x86_64-pc-windows-msvc"
+ ;;
+esac
case "$TARGET" in
- *android*)
- ;;
*linux*)
export LIBMNL_LIB_DIR="$SCRIPT_DIR/dist-assets/binaries/$TARGET"
export LIBNFTNL_LIB_DIR="$SCRIPT_DIR/dist-assets/binaries/$TARGET"
diff --git a/prepare_release.sh b/prepare_release.sh
index 3944dad675..52249a0a39 100755
--- a/prepare_release.sh
+++ b/prepare_release.sh
@@ -27,7 +27,7 @@ echo "Updating version in metadata files..."
./version-metadata.sh inject $PRODUCT_VERSION
echo "Syncing Cargo.lock with new version numbers"
-source env.sh ""
+source env.sh
# If cargo exits with a non zero exit status and it's not a timeout (exit code 124) it's an error
set +e
timeout 5s cargo +stable build