podcasts/scripts/cargo.sh
2018-11-29 23:24:46 +00:00

23 lines
389 B
Bash
Executable File

#!/bin/bash
set -ex
export CARGO_HOME=$1/target/cargo-home
export LOCALEDIR="$3"
export APP_ID="$4"
export VERSION="$5"
export PROFILE="$6"
ARGS=()
if test "$PROFILE" != "Devel"; then
echo "RELEASE MODE"
ARGS+=('--release')
fi
if test -d vendor; then
echo "VENDORED"
ARGS+=('--frozen')
fi
cargo build ${ARGS[@]} -p podcasts-gtk && cp $1/target/release/podcasts-gtk $2