mirror of
https://github.com/containers/youki
synced 2024-11-23 17:32:15 +01:00
112d7215d2
1) Add "set -e" to the script so that we will exit immediately on an error (including on the main "cargo build"). Currently if the actual build fails we will carry on with the script and return success, which makes this hard to use from scripts or from git bisect run. 2) We have two stanzas which remove specific files... only if they already don't exist. This is clearly pointless, so remove them. 3) [ ... ] and [[ ... ]] are essentially synonyms in bash, standardize on just [ ... ] for consistency. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
18 lines
328 B
Bash
Executable File
18 lines
328 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
TARGET=${TARGET-x86_64-unknown-linux-gnu}
|
|
if [ "$TARGET" != "" ]; then
|
|
TGT="--target $TARGET"
|
|
fi
|
|
VERSION=debug
|
|
if [ "$1" == "--release" ]; then
|
|
VERSION=release
|
|
fi
|
|
|
|
cargo build --verbose $TGT $1
|
|
|
|
cp target/$TARGET/$VERSION/youki .
|
|
cp target/$TARGET/$VERSION/integration_test ./youki_integration_test
|