mharizanov/avrdude-rpi — pull request #1 by Jerome-github (2014-03-02 22:39:26+00:00)
Title: Install in /usr/local/bin

Hi Martin.

Thanks for the avrdude-rpi trick.

While configuring it on my Pi, I modified it a bit. I thought it might be worth sharing.

Basically, the change is that I install in /usr/local/bin. I'm not all-knowing about debian or even linux conventions, but I think it is cleaner. I don't think anyone should mess up with /usr/bin, as this is packet manager territory.

In fact, the shortcoming of your method is that you need to redo it each time avrdude gets updated by the packet manager (I think).

Since I install in /usr/local/bin, I don't need to erase or move /usr/bin/avrdude, because local appears first in $PATH.

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

Note that this relies on this path order, but I assume it is common practice to have local first.

I don't have to name the script avrdude-autoreset and create a symlink (simplified installation).

Also note that I had to hardcode the path to strace. This is because of the use of sudo in the script, after which $PATH is reset. There are explanations for this on the internet. There are sudo settings for which this limitation does not apply, but this is another story. Anyway, this may look like a downside, coming from your script version, but in fact, I believe your version works not because strace is in the path, but rather because it is in the same directory as the script (/usr/bin), which is just like hardcoding.

(I also moved python installation up in the readme, as it is a prerequisite.)