Created
April 22, 2020 15:57
-
-
Save kbingham/4d2fe7193af1126fd59c037c9d15b2eb to your computer and use it in GitHub Desktop.
lcdebug wrapper helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# We default to enabling the most debug | |
# (that's why we're being used right) | |
FILTER="*" | |
LEVEL="0" | |
while [[ $# -gt 0 ]] | |
do | |
case $1 in | |
-x) | |
set -x; | |
shift; | |
;; | |
-f|--filter) | |
FILTER="$2"; | |
shift; shift; | |
;; | |
-l|--level) | |
LEVEL="$2"; | |
shift; shift; | |
;; | |
-h|--help) | |
echo "The following filters are available:" | |
git grep "^LOG_DEFINE_CATEGORY" | \ | |
awk -F '[()]' '{print $2}' | \ | |
sort | |
exit | |
;; | |
*) # unknown option, The rest belongs to the command | |
break; | |
;; | |
esac | |
done | |
LIBCAMERA_LOG_LEVELS=$FILTER:$LEVEL "${@}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment