Rename bcm43xx -> b43
[b43-tools.git] / disassembler / b43-dasm
diff --git a/disassembler/b43-dasm b/disassembler/b43-dasm
new file mode 100755 (executable)
index 0000000..be48c71
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+installed=0
+
+if [ $# -ne 2 ]; then
+       echo "Usage: $0 input_file.fw output_file.asm"
+       exit 1
+fi
+
+if [ -z "$B43_DASM" ]; then
+       if [ $installed -eq 0 ] && [ -x "./b43-dasm.bin" ]; then
+               B43_DASM="./b43-dasm.bin"
+       else
+               B43_DASM="b43-dasm.bin"
+       fi
+fi
+
+infile="$1"
+outfile="$2"
+
+cat "$infile" | $B43_DASM "$outfile"
+