build: Simplified the calling of cargo.sh

This commit is contained in:
Dorota Czaplejewicz
2019-09-24 11:26:22 +00:00
parent 169f33c67a
commit e7d30d933f
4 changed files with 9 additions and 9 deletions

8
cargo.sh Normal file → Executable file
View File

@ -6,16 +6,16 @@
set -e
SOURCE_DIR="$1"
SCRIPT_PATH=`realpath $0`
SOURCE_DIR=`dirname $0`
export CARGO_TARGET_DIR=`pwd`
if [ ! -z ${2} ]; then
OUT_PATH=`realpath "${2}"`
if [ ! -z ${1} ]; then
OUT_PATH=`realpath "${1}"`
fi
cd $SOURCE_DIR
shift
shift
cargo $BUILD_ARG $@
if [ ! -z ${OUT_PATH} ]; then