aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/clean/server/test.sh
diff options
context:
space:
mode:
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>2021-12-08 07:23:54 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-12-08 08:38:22 +0100
commit875c402bab73feaa5fea224aef64677fbef577da (patch)
tree1c1689adc0695dda86a305a3aa787cee6728a57f /scripts/clean/server/test.sh
parentf307255e694d290c346749bff68545d5dfc581cf (diff)
downloadPeerTube-875c402bab73feaa5fea224aef64677fbef577da.tar.gz
PeerTube-875c402bab73feaa5fea224aef64677fbef577da.tar.zst
PeerTube-875c402bab73feaa5fea224aef64677fbef577da.zip
scripts/test: make MacOS compatible
man xargs: -r Compatibility with GNU xargs. The GNU version of xargs runs the utility argument at least once, even if xargs input is empty, and it supports a -r option to inhibit this behavior. The FreeBSD version of xargs does not run the utility argument on empty input, but it supports the -r option for command-line compatibility with GNU xargs, but the -r option does nothing in the FreeBSD version of xargs.
Diffstat (limited to 'scripts/clean/server/test.sh')
-rwxr-xr-xscripts/clean/server/test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/clean/server/test.sh b/scripts/clean/server/test.sh
index f85daf810..5c30c7639 100755
--- a/scripts/clean/server/test.sh
+++ b/scripts/clean/server/test.sh
@@ -20,9 +20,9 @@ dropRedis () {
20 port=$((9000+$1)) 20 port=$((9000+$1))
21 host="localhost" 21 host="localhost"
22 22
23 redis-cli -h "$host" KEYS "bull-localhost:$port*" | grep -v empty | xargs --no-run-if-empty redis-cli -h "$host" DEL 23 redis-cli -h "$host" KEYS "bull-localhost:$port*" | grep -v empty | xargs -r redis-cli -h "$host" DEL
24 redis-cli -h "$host" KEYS "redis-localhost:$port*" | grep -v empty | xargs --no-run-if-empty redis-cli -h "$host" DEL 24 redis-cli -h "$host" KEYS "redis-localhost:$port*" | grep -v empty | xargs -r redis-cli -h "$host" DEL
25 redis-cli -h "$host" KEYS "*redis-localhost:$port-" | grep -v empty | xargs --no-run-if-empty redis-cli -h "$host" DEL 25 redis-cli -h "$host" KEYS "*redis-localhost:$port-" | grep -v empty | xargs -r redis-cli -h "$host" DEL
26} 26}
27 27
28seq=$(seq 1 6) 28seq=$(seq 1 6)