From f870853630231d2982628a4281dfd57426a7e86b Mon Sep 17 00:00:00 2001 From: Maple Date: Sun, 26 Apr 2026 14:57:02 +0200 Subject: [PATCH] clean up a bit and fix scripts --- build-edition.sh | 3 +++ buildscripts/common.sh | 4 +++- check-all.sh | 3 ++- check-edition.sh | 5 +++-- rnex-core/src/util.rs | 3 +-- test-edition.sh | 3 +++ 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build-edition.sh b/build-edition.sh index ce17110..6898acf 100755 --- a/build-edition.sh +++ b/build-edition.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash + +set -euo pipefail + if [ -z ${EDITION+x} ]; then EDITION=$1 fi diff --git a/buildscripts/common.sh b/buildscripts/common.sh index f224752..697ae87 100755 --- a/buildscripts/common.sh +++ b/buildscripts/common.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -set -e pipefail + +set -euo pipefail + TMP_FEATURES_TRAILINGCOMMA=$(yq ea ".$EDITION.features" editions.yaml | sed 's/- //g' | tr '\n' ',') export EDITION_FEATURES=${TMP_FEATURES_TRAILINGCOMMA::-1} SETTINGS=$(yq ea ".$EDITION.settings" editions.yaml | yq 'keys[]') diff --git a/check-all.sh b/check-all.sh index 47cbfbe..d6281ab 100755 --- a/check-all.sh +++ b/check-all.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash -set -e pipefail +set -euo pipefail SETTINGS=$(yq ea "." editions.yaml | yq 'keys[]') IFS=$'\n' while IFS=$'\n' read -r EDITION; do + export EDITION ./check-edition.sh $EDITION done <<< "$SETTINGS" diff --git a/check-edition.sh b/check-edition.sh index 7f814cb..c734770 100755 --- a/check-edition.sh +++ b/check-edition.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash -set -e pipefail + +set -euo pipefail if [ -z ${EDITION+x} ]; then - EDITION=$1 + export EDITION=$1 fi # comma seperated list of features for the specified version diff --git a/rnex-core/src/util.rs b/rnex-core/src/util.rs index 582c09b..2bcf87b 100644 --- a/rnex-core/src/util.rs +++ b/rnex-core/src/util.rs @@ -1,9 +1,8 @@ use crate::reggie::{UnitPacketRead, UnitPacketWrite}; use log::{error, info}; -use std::iter::FilterMap; use std::ops::Deref; use std::sync::{Arc, Weak}; -use std::{slice, vec}; +use std::vec; use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt}; use tokio::sync::Notify; use tokio::sync::mpsc::{Receiver, Sender, channel}; diff --git a/test-edition.sh b/test-edition.sh index ac3fc49..aaafad6 100755 --- a/test-edition.sh +++ b/test-edition.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash + +set -euo pipefail + if [ -z ${EDITION+x} ]; then EDITION=$1 fi