From 03192d2afbfe371750c7d21b38c7fa84f9976b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sun, 7 Nov 2021 13:30:42 +0100 Subject: [PATCH] scripts: improve run-aquatic-udp.sh and run-aquatic-ws.sh --- scripts/run-aquatic-udp.sh | 12 ++++++++++-- scripts/run-aquatic-ws.sh | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/run-aquatic-udp.sh b/scripts/run-aquatic-udp.sh index 6ccfb86..db41e58 100755 --- a/scripts/run-aquatic-udp.sh +++ b/scripts/run-aquatic-udp.sh @@ -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 diff --git a/scripts/run-aquatic-ws.sh b/scripts/run-aquatic-ws.sh index 3a7e8a5..5aadff6 100755 --- a/scripts/run-aquatic-ws.sh +++ b/scripts/run-aquatic-ws.sh @@ -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}"