arduino commandline: Using buspirate ICSP as programmer

Hi,

I am on LINUX:
From the IDE I choose the Buspirate as ICSP-Programmer, as port /dev/ttyUSB01, as board
Mega2560 witch an AtMega2560 cpu, I choose the sketch to upload and finally "upload with programmer"
and it works fine.

Trying to do the same from the commandline

arduino --upload --board arduino:avr:mega:cpu=atmega2560 --port /dev/ttyUSB1 --useprogrammer buspirate

and it fails with a buffer error.

How can I flash my Mega2560 board with my buispirate as an ICSP-Programmer?

Thanks for any help in advance!
Cheers
mcc01

You can't specify the programmer that way. You need to do it like this:

arduino --upload --board arduino:avr:mega:cpu=atmega2560 --port /dev/ttyUSB1 --useprogrammer --pref programmer=arduino:buspirate <sketch>