Merge branch 'shel' into 'master'

cargo.sh fixes

Closes #118

See merge request Librem5/squeekboard!182
This commit is contained in:
David Boddie
2019-09-27 15:18:10 +00:00

View File

@ -6,18 +6,19 @@
set -e set -e
SCRIPT_PATH=`realpath $0` SCRIPT_PATH="$(realpath "$0")"
SOURCE_DIR=`dirname $0` SOURCE_DIR="$(dirname "$SCRIPT_PATH")"
export CARGO_TARGET_DIR=`pwd` CARGO_TARGET_DIR="$(pwd)"
if [ ! -z ${1} ]; then export CARGO_TARGET_DIR
OUT_PATH=`realpath "${1}"` if [ -n "${1}" ]; then
OUT_PATH="$(realpath "$1")"
fi fi
cd $SOURCE_DIR cd "$SOURCE_DIR"
shift shift
cargo $BUILD_ARG $@ cargo "$@"
if [ ! -z ${OUT_PATH} ]; then if [ -n "${OUT_PATH}" ]; then
cp "${CARGO_TARGET_DIR}"/debug/librs.a "${OUT_PATH}" cp "${CARGO_TARGET_DIR}"/debug/librs.a "${OUT_PATH}"
fi fi