sxmo-utils/scripts/core/sxmo_blinkled.sh
Maxim Karasev 2c4da8fa0b
Make led blink more noticable
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-08-31 19:57:37 +02:00

20 lines
333 B
Bash
Executable file

#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
PIDS=""
for i in "$@"; do
sxmo_setled.sh "$i" 150 &
PIDS="$PIDS $!"
done
echo "$PIDS" | grep -E '[^ ]+' | xargs wait
# Make blink noticable
sleep 0.1
for i in "$@"; do
sxmo_setled.sh "$i" 0
done