Initial commit.
[b43-tools.git] / disassembler / bcm43xx-dasm
1 #!/bin/sh
2
3 installed=0
4
5 if [ $# -ne 2 ]; then
6         echo "Usage: $0 input_file.fw output_file.asm"
7         exit 1
8 fi
9
10 if [ -z "$BCM43xx_DASM" ]; then
11         if [ $installed -eq 0 ] && [ -x "./bcm43xx-dasm.bin" ]; then
12                 BCM43xx_DASM="./bcm43xx-dasm.bin"
13         else
14                 BCM43xx_DASM="bcm43xx-dasm.bin"
15         fi
16 fi
17
18 infile="$1"
19 outfile="$2"
20
21 cat "$infile" | $BCM43xx_DASM "$outfile"
22