From fe4a06d6bd6cea9899295c550076894b19c3f09b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 26 Apr 2024 09:19:39 +0200 Subject: split queue per arch --- mockrun | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'mockrun') diff --git a/mockrun b/mockrun index fddac87..1d3e51a 100755 --- a/mockrun +++ b/mockrun @@ -3,6 +3,15 @@ CHECK=$(redis-cli ping) [ "$CHECK" = "PONG" ] || exit 1 +# ARCH detection and check +if [ "$(uname -m)" = "x86_64" ]; then + SUF=x + QUEUE=mockx +else + SUF=a + QUEUE=mocka +fi + if [ "$1" = "-h" -o "$1" = "--help" ]; then echo "Usage $0 [ option ]" echo " -e --erase to empty the queue" @@ -12,17 +21,17 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then exit 0 elif [ "$1" = "-l" -o "$1" = "--list" ]; then - redis-cli smembers mock + redis-cli smembers $QUEUE exit 0 elif [ "$1" = "-e" -o "$1" = "--erase" ]; then - redis-cli del mock + redis-cli del $QUEUE exit 0 fi while true do - CMD=$(redis-cli spop mock) + CMD=$(redis-cli spop $QUEUE) if [ -z "$CMD" ]; then if [ "$1" = "-p" -o "$1" = "--perm" ]; then echo -n . -- cgit