From 4db21c6ec26bdfada6643fae5b791b0d507d369b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 29 Feb 2024 20:03:12 +0100 Subject: [PATCH] Fix shebangs of bash scripts to work under NixOS Signed-off-by: Steffen Vogel --- packaging/deps.sh | 5 ++- packaging/live-iso/ensure_loop.sh | 3 +- tests/benchmarks/run-benchmark.sh | 44 +++++++++---------- tests/integration/api-capabilities.sh | 2 +- tests/integration/api-config.sh | 2 +- tests/integration/api-nodes.sh | 2 +- tests/integration/api-paths.sh | 2 +- tests/integration/api-restart.sh | 4 +- tests/integration/api-shutdown.sh | 4 +- tests/integration/api-stress.sh | 8 ++-- tests/integration/compare.sh | 2 +- tests/integration/convert.sh | 2 +- tests/integration/hook-average.sh | 2 +- tests/integration/hook-cast.sh | 2 +- tests/integration/hook-decimate.sh | 2 +- tests/integration/hook-digest.sh | 2 +- tests/integration/hook-drop.sh | 2 +- tests/integration/hook-frame.sh | 2 +- tests/integration/hook-gate.sh | 2 +- tests/integration/hook-limit_rate.sh | 2 +- tests/integration/hook-lua.sh | 2 +- tests/integration/hook-lua_script.sh | 2 +- tests/integration/hook-print.sh | 2 +- tests/integration/hook-reorder_ts.sh | 2 +- tests/integration/hook-scale.sh | 2 +- tests/integration/hook-shift_seq.sh | 2 +- tests/integration/hook-shift_ts.sh | 2 +- tests/integration/hook-skip_first.sh | 2 +- tests/integration/hook-skip_first2.sh | 2 +- tests/integration/missing-example-configs.sh | 2 +- tests/integration/node-can.sh | 4 +- tests/integration/node-example.sh | 2 +- tests/integration/node-hook.sh | 6 +-- tests/integration/node-infiniband.sh | 28 ++++++------ tests/integration/node-loopback-socket.sh | 4 +- tests/integration/node-mapping.sh | 2 +- .../integration/node-multiple-destinations.sh | 2 +- tests/integration/node-multiple-sources.sh | 2 +- tests/integration/node-multiplexing.sh | 2 +- tests/integration/node-rate.sh | 2 +- tests/integration/node-stats.sh | 2 +- tests/integration/node-test_rtt.sh | 2 +- tests/integration/pipe-loopback-amqp.sh | 2 +- tests/integration/pipe-loopback-exec.sh | 4 +- tests/integration/pipe-loopback-file.sh | 2 +- .../integration/pipe-loopback-iec61850-9-2.sh | 6 +-- tests/integration/pipe-loopback-loopback.sh | 2 +- tests/integration/pipe-loopback-mqtt.sh | 6 +-- tests/integration/pipe-loopback-nanomsg.sh | 6 +-- tests/integration/pipe-loopback-redis.sh | 4 +- tests/integration/pipe-loopback-rtp-dual.sh | 2 +- tests/integration/pipe-loopback-rtp-remote.sh | 2 +- tests/integration/pipe-loopback-rtp-tbf.sh | 2 +- tests/integration/pipe-loopback-rtp.sh | 2 +- tests/integration/pipe-loopback-shmem.sh | 2 +- .../pipe-loopback-socket-multicast.sh | 4 +- .../integration/pipe-loopback-socket-netem.sh | 2 +- tests/integration/pipe-loopback-socket.sh | 6 +-- tests/integration/pipe-loopback-websocket.sh | 2 +- tests/integration/pipe-loopback-zeromq.sh | 4 +- tests/integration/pipe-python-protobuf.sh | 2 +- tests/integration/relay.sh | 2 +- tests/integration/signal.sh | 2 +- tests/integration/test-config.sh | 2 +- tools/docker-dev.sh | 2 +- tools/fpga-cat.sh | 4 +- tools/fpga-non-root.sh | 2 +- tools/fpga-xbar-select.sh | 4 +- tools/gdb-sudo.sh | 2 +- tools/pci-rebind-device.sh | 2 +- tools/pci-reset-device.sh | 2 +- tools/start-fpga.sh | 2 +- tools/tc-dump.sh | 2 +- tools/tc-netem.sh | 2 +- tools/tc-netem2.sh | 2 +- tools/tune-realtime.sh | 2 +- tools/villas | 2 +- tools/villas-api.sh | 2 +- tools/villas-helper.sh | 8 ++-- 79 files changed, 143 insertions(+), 139 deletions(-) diff --git a/packaging/deps.sh b/packaging/deps.sh index 130c96381..2b12b9231 100644 --- a/packaging/deps.sh +++ b/packaging/deps.sh @@ -1,4 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash +# +# A shell script to install various dependencies required by VILLASnode +# # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 diff --git a/packaging/live-iso/ensure_loop.sh b/packaging/live-iso/ensure_loop.sh index c0ade25a4..b292d58ba 100755 --- a/packaging/live-iso/ensure_loop.sh +++ b/packaging/live-iso/ensure_loop.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash +# # Ensure that we have at least two usable loop devices inside our Docker container # # Source: https://github.com/jpetazzo/dind/issues/19#issuecomment-48859883 diff --git a/tests/benchmarks/run-benchmark.sh b/tests/benchmarks/run-benchmark.sh index 804be8337..84f74ea13 100755 --- a/tests/benchmarks/run-benchmark.sh +++ b/tests/benchmarks/run-benchmark.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration Infiniband test using villas-node. # @@ -90,7 +90,7 @@ for NODETYPE in "${NODETYPES[@]}" do # CREATE PATH CONFIG FILES - + # Set target and source config file, which is the same for both runs cat > ${CONFIG_SOURCE} < ${CONFIG_TARGET} < ${CONFIG} <> ${CONFIG} + cat configs/${NODETYPE}.conf | sed -e "s/\${NUM_VALUE}/${NUM_VALUE}/" -e "s/\${IB_MODE}/${IB_MODE}/" >> ${CONFIG} cat >> ${CONFIG} < local.json <> ${FIFO}" ERR FETCHED_CONF=$(mktemp -p ${DIR}) - + curl -s http://localhost:8080/api/v2/config > ${FETCHED_CONF} diff -u <(jq -S . < ${FETCHED_CONF}) <(jq -S . < ${LOCAL_CONF}) RC=$? - + if [ "$RC" -eq "0" ]; then echo success >&5 else @@ -69,7 +69,7 @@ wait %1 echo "Check return codes" for J in $(seq 1 ${RUNS}); do read -t 10 -u 5 STATUS - + if [ "${STATUS}" == "success" ]; then let ++SUCCESS else diff --git a/tests/integration/compare.sh b/tests/integration/compare.sh index 2ecd4a42a..c68f27f32 100755 --- a/tests/integration/compare.sh +++ b/tests/integration/compare.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for villas compare. # diff --git a/tests/integration/convert.sh b/tests/integration/convert.sh index d2f50bfb8..c047c6303 100755 --- a/tests/integration/convert.sh +++ b/tests/integration/convert.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for villas convert tool # diff --git a/tests/integration/hook-average.sh b/tests/integration/hook-average.sh index f66011d9f..e5fe2021d 100755 --- a/tests/integration/hook-average.sh +++ b/tests/integration/hook-average.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for average hook. # diff --git a/tests/integration/hook-cast.sh b/tests/integration/hook-cast.sh index 35868089e..5c22a4697 100755 --- a/tests/integration/hook-cast.sh +++ b/tests/integration/hook-cast.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for cast hook. # diff --git a/tests/integration/hook-decimate.sh b/tests/integration/hook-decimate.sh index 58f31decd..2eb995991 100755 --- a/tests/integration/hook-decimate.sh +++ b/tests/integration/hook-decimate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for decimate hook. # diff --git a/tests/integration/hook-digest.sh b/tests/integration/hook-digest.sh index a2bed93cd..13bcbaf9a 100755 --- a/tests/integration/hook-digest.sh +++ b/tests/integration/hook-digest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for digest hook. # diff --git a/tests/integration/hook-drop.sh b/tests/integration/hook-drop.sh index 1d4127f73..7d5a5e7c9 100755 --- a/tests/integration/hook-drop.sh +++ b/tests/integration/hook-drop.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for drop hook. # diff --git a/tests/integration/hook-frame.sh b/tests/integration/hook-frame.sh index dce8d18ee..a852c72c2 100755 --- a/tests/integration/hook-frame.sh +++ b/tests/integration/hook-frame.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for frame hook. # diff --git a/tests/integration/hook-gate.sh b/tests/integration/hook-gate.sh index 2e32de58c..c68828d28 100755 --- a/tests/integration/hook-gate.sh +++ b/tests/integration/hook-gate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for gate hook. # diff --git a/tests/integration/hook-limit_rate.sh b/tests/integration/hook-limit_rate.sh index f546ebc45..471677ca6 100755 --- a/tests/integration/hook-limit_rate.sh +++ b/tests/integration/hook-limit_rate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for limit_rate hook. # diff --git a/tests/integration/hook-lua.sh b/tests/integration/hook-lua.sh index d7c204b9f..d17907261 100755 --- a/tests/integration/hook-lua.sh +++ b/tests/integration/hook-lua.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for scale hook. # diff --git a/tests/integration/hook-lua_script.sh b/tests/integration/hook-lua_script.sh index 6c4fd832c..5f7e45d99 100755 --- a/tests/integration/hook-lua_script.sh +++ b/tests/integration/hook-lua_script.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for scale hook. # diff --git a/tests/integration/hook-print.sh b/tests/integration/hook-print.sh index 11538f09f..983bac8a6 100755 --- a/tests/integration/hook-print.sh +++ b/tests/integration/hook-print.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for print hook. # diff --git a/tests/integration/hook-reorder_ts.sh b/tests/integration/hook-reorder_ts.sh index a62a5da30..bc11002ea 100755 --- a/tests/integration/hook-reorder_ts.sh +++ b/tests/integration/hook-reorder_ts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for reorder_ts hook. # diff --git a/tests/integration/hook-scale.sh b/tests/integration/hook-scale.sh index 0b72f21b3..be9b78c23 100755 --- a/tests/integration/hook-scale.sh +++ b/tests/integration/hook-scale.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for scale hook. # diff --git a/tests/integration/hook-shift_seq.sh b/tests/integration/hook-shift_seq.sh index 01264daf6..e51a358c7 100755 --- a/tests/integration/hook-shift_seq.sh +++ b/tests/integration/hook-shift_seq.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for shift_seq hook. # diff --git a/tests/integration/hook-shift_ts.sh b/tests/integration/hook-shift_ts.sh index a195cc12f..f4a9dad99 100755 --- a/tests/integration/hook-shift_ts.sh +++ b/tests/integration/hook-shift_ts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for shift_ts hook. # diff --git a/tests/integration/hook-skip_first.sh b/tests/integration/hook-skip_first.sh index 0797a8630..7665e980b 100755 --- a/tests/integration/hook-skip_first.sh +++ b/tests/integration/hook-skip_first.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for skip_first hook. # diff --git a/tests/integration/hook-skip_first2.sh b/tests/integration/hook-skip_first2.sh index e36d29a8b..58a639d07 100755 --- a/tests/integration/hook-skip_first2.sh +++ b/tests/integration/hook-skip_first2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for skip_first hook. # diff --git a/tests/integration/missing-example-configs.sh b/tests/integration/missing-example-configs.sh index b4c62826f..dc3076e9f 100755 --- a/tests/integration/missing-example-configs.sh +++ b/tests/integration/missing-example-configs.sh @@ -1,5 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test example configurations # diff --git a/tests/integration/node-can.sh b/tests/integration/node-can.sh index 615dadb4f..e32cf9ebb 100755 --- a/tests/integration/node-can.sh +++ b/tests/integration/node-can.sh @@ -1,11 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration can test using villas node. # # Author: Niklas Eiling # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 -# To set up vcan interface use the following commands +# To set up vcan interface use the following commands # sudo modprobe vcan # sudo ip link add dev vcan0 type vcan # sudo ip link set vcan0 up diff --git a/tests/integration/node-example.sh b/tests/integration/node-example.sh index c66158ff1..af263fd4f 100755 --- a/tests/integration/node-example.sh +++ b/tests/integration/node-example.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test for the example node-type # diff --git a/tests/integration/node-hook.sh b/tests/integration/node-hook.sh index fabefa518..83b0e0f74 100755 --- a/tests/integration/node-hook.sh +++ b/tests/integration/node-hook.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test hooks in villas node # @@ -49,13 +49,13 @@ cat > config.json <output.dat <${FIFO} & + villas pipe -l ${NUM_SAMPLES} config.json ib_node_source >output.dat <${FIFO} & PID_PIPE=$! - + # Keep pipe alive sleep 5 >${FIFO} & - + # Wait for pipe to connect to node sleep 3 - + # Write data to pipe cat input.dat >${FIFO} & - + # Wait for node to handle samples sleep 2 - + # Stop node - kill ${PID_PIPE} + kill ${PID_PIPE} kill ${PID_PROC} - + villas compare input.dat output.dat - sed -i -e 's/'${MODE}'/MODE/g' config.json + sed -i -e 's/'${MODE}'/MODE/g' config.json done diff --git a/tests/integration/node-loopback-socket.sh b/tests/integration/node-loopback-socket.sh index 488f74903..b482d1673 100755 --- a/tests/integration/node-loopback-socket.sh +++ b/tests/integration/node-loopback-socket.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # @@ -14,7 +14,7 @@ pushd ${DIR} function finish { popd rm -rf ${DIR} - + kill -SIGTERM 0 # kill all decendants } trap finish EXIT diff --git a/tests/integration/node-mapping.sh b/tests/integration/node-mapping.sh index f73261087..171522e2c 100755 --- a/tests/integration/node-mapping.sh +++ b/tests/integration/node-mapping.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/node-multiple-destinations.sh b/tests/integration/node-multiple-destinations.sh index e53716b41..34d981a0f 100755 --- a/tests/integration/node-multiple-destinations.sh +++ b/tests/integration/node-multiple-destinations.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/node-multiple-sources.sh b/tests/integration/node-multiple-sources.sh index d25f7cf32..401637056 100755 --- a/tests/integration/node-multiple-sources.sh +++ b/tests/integration/node-multiple-sources.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/node-multiplexing.sh b/tests/integration/node-multiplexing.sh index fe1f0eb33..708c14f12 100755 --- a/tests/integration/node-multiplexing.sh +++ b/tests/integration/node-multiplexing.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/node-rate.sh b/tests/integration/node-rate.sh index ced0c4700..63d8a5a12 100755 --- a/tests/integration/node-rate.sh +++ b/tests/integration/node-rate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/node-stats.sh b/tests/integration/node-stats.sh index b26bb3f3a..9ce13952b 100755 --- a/tests/integration/node-stats.sh +++ b/tests/integration/node-stats.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/node-test_rtt.sh b/tests/integration/node-test_rtt.sh index 8231fd59c..04126782e 100755 --- a/tests/integration/node-test_rtt.sh +++ b/tests/integration/node-test_rtt.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test using villas node. # diff --git a/tests/integration/pipe-loopback-amqp.sh b/tests/integration/pipe-loopback-amqp.sh index 3cb60ec2e..a5b805054 100755 --- a/tests/integration/pipe-loopback-amqp.sh +++ b/tests/integration/pipe-loopback-amqp.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-exec.sh b/tests/integration/pipe-loopback-exec.sh index 6135a0ae5..19adc58c0 100755 --- a/tests/integration/pipe-loopback-exec.sh +++ b/tests/integration/pipe-loopback-exec.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -18,7 +18,7 @@ function finish { trap finish EXIT NUM_SAMPLES=${NUM_SAMPLES:-100} -FORMAT="villas.human" +FORMAT="villas.human" cat > config.json << EOF { diff --git a/tests/integration/pipe-loopback-file.sh b/tests/integration/pipe-loopback-file.sh index d157d3dd6..e4c605864 100755 --- a/tests/integration/pipe-loopback-file.sh +++ b/tests/integration/pipe-loopback-file.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-iec61850-9-2.sh b/tests/integration/pipe-loopback-iec61850-9-2.sh index 9730e6722..c4f684eef 100755 --- a/tests/integration/pipe-loopback-iec61850-9-2.sh +++ b/tests/integration/pipe-loopback-iec61850-9-2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -27,9 +27,9 @@ cat > config.json << EOF "nodes": { "node1": { "type": "iec61850-9-2", - + "interface": "lo", - + "out": { "svid": "1234", "signals": [ diff --git a/tests/integration/pipe-loopback-loopback.sh b/tests/integration/pipe-loopback-loopback.sh index 92c561580..d69916274 100755 --- a/tests/integration/pipe-loopback-loopback.sh +++ b/tests/integration/pipe-loopback-loopback.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-mqtt.sh b/tests/integration/pipe-loopback-mqtt.sh index 2c523245a..ca4f0b47d 100755 --- a/tests/integration/pipe-loopback-mqtt.sh +++ b/tests/integration/pipe-loopback-mqtt.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -18,7 +18,7 @@ function finish { trap finish EXIT NUM_SAMPLES=${NUM_SAMPLES:-100} -FORMAT="protobuf" +FORMAT="protobuf" VECTORIZE="10" HOST="localhost" @@ -40,7 +40,7 @@ cat > config.json << EOF "password": "guest", "host": "${HOST}", "port": 1883, - + "out": { "publish": "test-topic" }, diff --git a/tests/integration/pipe-loopback-nanomsg.sh b/tests/integration/pipe-loopback-nanomsg.sh index 2e7a9f991..b1e4f3d6a 100755 --- a/tests/integration/pipe-loopback-nanomsg.sh +++ b/tests/integration/pipe-loopback-nanomsg.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -19,7 +19,7 @@ trap finish EXIT NUM_SAMPLES=${NUM_SAMPLES:-100} -FORMAT="protobuf" +FORMAT="protobuf" VECTORIZE="10" cat > config.json << EOF @@ -27,7 +27,7 @@ cat > config.json << EOF "nodes": { "node1": { "type": "nanomsg", - + "format": "${FORMAT}", "vectorize": ${VECTORIZE}, diff --git a/tests/integration/pipe-loopback-redis.sh b/tests/integration/pipe-loopback-redis.sh index ecd33f30e..c41f733af 100755 --- a/tests/integration/pipe-loopback-redis.sh +++ b/tests/integration/pipe-loopback-redis.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -34,7 +34,7 @@ cat > config.json << EOF "type": "redis", "format": "protobuf", "vectorize": 10, - + "uri": "tcp://${HOST}:6379/0" } } diff --git a/tests/integration/pipe-loopback-rtp-dual.sh b/tests/integration/pipe-loopback-rtp-dual.sh index 32fd82cfe..a898d2b09 100755 --- a/tests/integration/pipe-loopback-rtp-dual.sh +++ b/tests/integration/pipe-loopback-rtp-dual.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-rtp-remote.sh b/tests/integration/pipe-loopback-rtp-remote.sh index 46df8a054..0d5d928bc 100755 --- a/tests/integration/pipe-loopback-rtp-remote.sh +++ b/tests/integration/pipe-loopback-rtp-remote.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-rtp-tbf.sh b/tests/integration/pipe-loopback-rtp-tbf.sh index 89d08b9c6..2e0bfc7ed 100755 --- a/tests/integration/pipe-loopback-rtp-tbf.sh +++ b/tests/integration/pipe-loopback-rtp-tbf.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-rtp.sh b/tests/integration/pipe-loopback-rtp.sh index 0dbe6b143..4b8733486 100755 --- a/tests/integration/pipe-loopback-rtp.sh +++ b/tests/integration/pipe-loopback-rtp.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-shmem.sh b/tests/integration/pipe-loopback-shmem.sh index 5f7f01359..6f905e952 100755 --- a/tests/integration/pipe-loopback-shmem.sh +++ b/tests/integration/pipe-loopback-shmem.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-socket-multicast.sh b/tests/integration/pipe-loopback-socket-multicast.sh index 7a7178737..47d40583e 100755 --- a/tests/integration/pipe-loopback-socket-multicast.sh +++ b/tests/integration/pipe-loopback-socket-multicast.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -28,7 +28,7 @@ cat > config.json << EOF "in": { "address": "*:12000", - + "multicast": { "enabled": true, diff --git a/tests/integration/pipe-loopback-socket-netem.sh b/tests/integration/pipe-loopback-socket-netem.sh index 460794cf6..4b3901754 100755 --- a/tests/integration/pipe-loopback-socket-netem.sh +++ b/tests/integration/pipe-loopback-socket-netem.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-socket.sh b/tests/integration/pipe-loopback-socket.sh index 881e693a3..a25bd57c3 100755 --- a/tests/integration/pipe-loopback-socket.sh +++ b/tests/integration/pipe-loopback-socket.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -46,7 +46,7 @@ case ${LAYER} in LOCAL="00:00:00:00:00:00%lo:34997" REMOTE="00:00:00:00:00:00%lo:34997" ;; - + unix) LOCAL=$(mktemp) REMOTE=${LOCAL} @@ -58,7 +58,7 @@ cat > config.json << EOF "nodes": { "node1": { "type": "socket", - + "vectorize": ${VECTORIZE}, "format": "${FORMAT}", "layer": "${LAYER}", diff --git a/tests/integration/pipe-loopback-websocket.sh b/tests/integration/pipe-loopback-websocket.sh index a3b0e7b81..9e65044c1 100755 --- a/tests/integration/pipe-loopback-websocket.sh +++ b/tests/integration/pipe-loopback-websocket.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # diff --git a/tests/integration/pipe-loopback-zeromq.sh b/tests/integration/pipe-loopback-zeromq.sh index 0846b2955..fdba678ca 100755 --- a/tests/integration/pipe-loopback-zeromq.sh +++ b/tests/integration/pipe-loopback-zeromq.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration loopback test for villas pipe. # @@ -18,7 +18,7 @@ function finish { trap finish EXIT NUM_SAMPLES=${NUM_SAMPLES:-10} - + VECTORIZE="10" FORMAT="protobuf" diff --git a/tests/integration/pipe-python-protobuf.sh b/tests/integration/pipe-python-protobuf.sh index 129704fe0..f9bff522d 100755 --- a/tests/integration/pipe-python-protobuf.sh +++ b/tests/integration/pipe-python-protobuf.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test protobuf serialization with Python client # diff --git a/tests/integration/relay.sh b/tests/integration/relay.sh index a02657360..bff41f2df 100755 --- a/tests/integration/relay.sh +++ b/tests/integration/relay.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for villas relay # diff --git a/tests/integration/signal.sh b/tests/integration/signal.sh index cfeb9648a..7778bed64 100755 --- a/tests/integration/signal.sh +++ b/tests/integration/signal.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Integration test for villas signal tool # diff --git a/tests/integration/test-config.sh b/tests/integration/test-config.sh index 761c0d03d..2041289fb 100755 --- a/tests/integration/test-config.sh +++ b/tests/integration/test-config.sh @@ -1,5 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test example configurations # diff --git a/tools/docker-dev.sh b/tools/docker-dev.sh index 465379763..f7baa332a 100755 --- a/tools/docker-dev.sh +++ b/tools/docker-dev.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Start a Docker based development environment # diff --git a/tools/fpga-cat.sh b/tools/fpga-cat.sh index 0fd1a73a8..3dc99f25e 100755 --- a/tools/fpga-cat.sh +++ b/tools/fpga-cat.sh @@ -1,5 +1,5 @@ -#!/bin/bash -# +#!/usr/bin/env bash +# # Author: Niklas Eiling # SPDX-FileCopyrightText: 2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 diff --git a/tools/fpga-non-root.sh b/tools/fpga-non-root.sh index 3b70f3e44..fec19036f 100755 --- a/tools/fpga-non-root.sh +++ b/tools/fpga-non-root.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Setup VFIO for non-root users # diff --git a/tools/fpga-xbar-select.sh b/tools/fpga-xbar-select.sh index 1db53ea61..a2a960e16 100644 --- a/tools/fpga-xbar-select.sh +++ b/tools/fpga-xbar-select.sh @@ -1,5 +1,5 @@ -#!/bin/bash -# +#!/usr/bin/env bash +# # Author: Niklas Eiling # SPDX-FileCopyrightText: 2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 diff --git a/tools/gdb-sudo.sh b/tools/gdb-sudo.sh index a10c8a301..bab23683c 100755 --- a/tools/gdb-sudo.sh +++ b/tools/gdb-sudo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Run GDB as sudo for VS Code debugger # See: .vscode directory diff --git a/tools/pci-rebind-device.sh b/tools/pci-rebind-device.sh index 7382fff8f..be89c5fb7 100755 --- a/tools/pci-rebind-device.sh +++ b/tools/pci-rebind-device.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Detach and rebind a PCI device to a PCI kernel driver # diff --git a/tools/pci-reset-device.sh b/tools/pci-reset-device.sh index 4cf877597..23a08b229 100755 --- a/tools/pci-reset-device.sh +++ b/tools/pci-reset-device.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Reset PCI devices like FPGAs after a reflash # diff --git a/tools/start-fpga.sh b/tools/start-fpga.sh index 0693b2bd0..2c9743981 100755 --- a/tools/start-fpga.sh +++ b/tools/start-fpga.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 diff --git a/tools/tc-dump.sh b/tools/tc-dump.sh index f0e7ff9e4..3dd6777b5 100755 --- a/tools/tc-dump.sh +++ b/tools/tc-dump.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Dump Linux traffic control state to screen. # diff --git a/tools/tc-netem.sh b/tools/tc-netem.sh index e6aefaced..36ec7144c 100755 --- a/tools/tc-netem.sh +++ b/tools/tc-netem.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Transparent Network Emulation Proxy for Layer 2 & 3 # diff --git a/tools/tc-netem2.sh b/tools/tc-netem2.sh index 6f5ebed14..517ebb651 100755 --- a/tools/tc-netem2.sh +++ b/tools/tc-netem2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Transparent Network Emulation Proxy for Layer 2 & 3 # diff --git a/tools/tune-realtime.sh b/tools/tune-realtime.sh index 8f1819df3..1eca0ca87 100755 --- a/tools/tune-realtime.sh +++ b/tools/tune-realtime.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 diff --git a/tools/villas b/tools/villas index e3f95be10..95f0cc1aa 100755 --- a/tools/villas +++ b/tools/villas @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Wrapper to start tool of the VILLASnode suite # # This allows you to use VILLASnode tools like this: diff --git a/tools/villas-api.sh b/tools/villas-api.sh index e634af21a..82c9543ac 100755 --- a/tools/villas-api.sh +++ b/tools/villas-api.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 diff --git a/tools/villas-helper.sh b/tools/villas-helper.sh index 7833eb64b..700e70580 100755 --- a/tools/villas-helper.sh +++ b/tools/villas-helper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Some helper functions for our integration test suite # @@ -8,12 +8,12 @@ function villas_format_supports_vectorize() { local FORMAT=$1 - + case ${FORMAT} in raw*) return 1 ;; gtnet*) return 1 ;; esac - + return 0 } @@ -24,7 +24,7 @@ function villas_format_supports_header() { raw*) return 1 ;; gtnet) return 1 ;; esac - + return 0 }