mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 14:40:19 +00:00
21 lines
No EOL
399 B
Bash
21 lines
No EOL
399 B
Bash
#!/bin/bash
|
|
|
|
duration='2'
|
|
run_example() {
|
|
cargo build --example $1
|
|
timeout "$duration" cargo run --example $1
|
|
}
|
|
|
|
for entry in examples/*
|
|
do
|
|
IFS='/'
|
|
read -ra ADDR <<< $entry
|
|
IFS=' '
|
|
example_file="${ADDR[1]}"
|
|
if [ ${example_file: -2} == "rs" ]
|
|
then
|
|
example="${example_file::-3}"
|
|
echo "Running example: $example"
|
|
run_example $example
|
|
fi
|
|
done |