scripts: improve run-aquatic-udp.sh and run-aquatic-ws.sh

This commit is contained in:
Joakim Frostegård 2021-11-07 13:30:42 +01:00
parent b653e3e3ff
commit 03192d2afb
2 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,13 @@
#!/bin/sh
#!/bin/bash
. ./scripts/env-native-cpu-without-avx-512
cargo run --release --bin aquatic_udp -- $@
if [ "$1" != "mio" ] && [ "$1" != "glommio" ]; then
echo "Usage: $0 [mio|glommio] [ARGS]"
else
if [ "$1" = "mio" ]; then
cargo run --release --bin aquatic_udp -- "${@:2}"
else
cargo run --release --features "with-glommio" --no-default-features --bin aquatic_udp -- "${@:2}"
fi
fi

View file

@ -2,8 +2,8 @@
. ./scripts/env-native-cpu-without-avx-512
if [[ -z $1 ]]; then
echo "Usage: $0 [mio|glommio]"
if [ "$1" != "mio" ] && [ "$1" != "glommio" ]; then
echo "Usage: $0 [mio|glommio] [ARGS]"
else
if [ "$1" = "mio" ]; then
cargo run --release --bin aquatic_ws -- "${@:2}"