From c6ac8de4715bd4d005bbcc190784e1b4133db47b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Apr 2023 13:55:49 +0200 Subject: quote googoo aliases --- bin/common/goo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/common') diff --git a/bin/common/goo b/bin/common/goo index 442f25c..cfd03ec 100755 --- a/bin/common/goo +++ b/bin/common/goo @@ -18,6 +18,6 @@ arduino15" for dir in $exclude; do dirs="$dirs -name \"$dir\" -o " done -cmd="find ${2:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -print" +cmd="find ${2:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" eval "$cmd" 2>/dev/null -- cgit v1.2.3 From 031a267cad2f69a83263587b79c23e9312c451e4 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Apr 2023 16:17:37 +0200 Subject: added checks to hexrgb --- bin/common/hextorgb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin/common') diff --git a/bin/common/hextorgb b/bin/common/hextorgb index 63fcbbc..a50dfd9 100755 --- a/bin/common/hextorgb +++ b/bin/common/hextorgb @@ -1,6 +1,14 @@ #!/usr/bin/env sh -tr -d '#' | - tr '[:lower:]' '[:upper:]' | +test which > /dev/null || + exit 1 +if test -t 0 +then + echo "$1" +else + cat /dev/stdin +fi | + tr -d '#' | # remove '#' + tr '[:lower:]' '[:upper:]' | # uppercase is needed for bc sed 's/\([0-9A-F]\{2\}\)/\1\n/g;iibase=16' | bc | tr '\n' ',' | -- cgit v1.2.3