mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
scripts: Change features_build variable type to array
Because of double quotes the current value is passed as a single argument with a space in it to cargo. This commit changes it to an array so each element is passed as a different arguments. Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
This commit is contained in:
committed by
Rob Bradford
parent
efc24119f3
commit
3f2ca5375e
@@ -221,7 +221,7 @@ cmd_build() {
|
|||||||
build="debug"
|
build="debug"
|
||||||
libc="gnu"
|
libc="gnu"
|
||||||
hypervisor="kvm"
|
hypervisor="kvm"
|
||||||
features_build=""
|
features_build=()
|
||||||
exported_device="/dev/kvm"
|
exported_device="/dev/kvm"
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -252,7 +252,7 @@ cmd_build() {
|
|||||||
;;
|
;;
|
||||||
"--features")
|
"--features")
|
||||||
shift
|
shift
|
||||||
features_build="--features $1"
|
features_build=(--features "$1")
|
||||||
;;
|
;;
|
||||||
"--") {
|
"--") {
|
||||||
shift
|
shift
|
||||||
@@ -298,7 +298,7 @@ cmd_build() {
|
|||||||
--env RUSTFLAGS="$rustflags" \
|
--env RUSTFLAGS="$rustflags" \
|
||||||
--env TARGET_CC="$target_cc" \
|
--env TARGET_CC="$target_cc" \
|
||||||
"$CTR_IMAGE" \
|
"$CTR_IMAGE" \
|
||||||
cargo build --all "$features_build" \
|
cargo build --all "${features_build[@]}" \
|
||||||
--target-dir "$CTR_CLH_CARGO_TARGET" \
|
--target-dir "$CTR_CLH_CARGO_TARGET" \
|
||||||
"${cargo_args[@]}" && say "Binaries placed under $CLH_CARGO_TARGET/$target/$build"
|
"${cargo_args[@]}" && say "Binaries placed under $CLH_CARGO_TARGET/$target/$build"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user