[Intel-gfx] [PATCH] aubdump: Fix intel_aubdump -o <filename>
Kenneth Graunke
kenneth at whitecape.org
Wed Nov 23 23:53:33 UTC 2016
This looks like a mistake in 1f43677f895a88ae880b35f9b18cc7e6869d0ca6.
---
tools/intel_aubdump.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This code still looks really weird. ${foo:bar} means "the value of $foo,
unless it's unset/empty, in which case 'bar'. But if $file is empty...
then we process $file? Maybe I'm not reading it right.
diff --git a/tools/intel_aubdump.in b/tools/intel_aubdump.in
index 343dc29..977fe95 100644
--- a/tools/intel_aubdump.in
+++ b/tools/intel_aubdump.in
@@ -36,31 +36,31 @@ function add_arg() {
function build_command () {
command=""
for i in $1; do
if [ -z $command ]; then
command=$i
else
command="$command,$i"
fi;
done
}
while true; do
case "$1" in
-o)
file=$2
- add_arg "file=${f:-$(basename ${f}).aub}"
+ add_arg "file=${file:-$(basename ${file}).aub}"
shift 2
;;
-v)
add_arg "verbose=1"
shift 1
;;
-o*)
file=${1##-o}
add_arg "file=${file:-$(basename ${file}).aub}"
shift
;;
--output=*)
file=${1##--output=}
add_arg "file=${file:-$(basename ${file}).aub}"
shift
--
2.10.2
More information about the Intel-gfx
mailing list