From dd5795e152591c07b1e809109434042916eca07f Mon Sep 17 00:00:00 2001 From: Dustin Schnee Date: Tue, 13 Sep 2011 07:57:58 -0300 Subject: development/avrdude: Updated for version 5.11. Signed-off-by: Niels Horn --- development/avrdude/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 development/avrdude/doinst.sh (limited to 'development/avrdude/doinst.sh') diff --git a/development/avrdude/doinst.sh b/development/avrdude/doinst.sh new file mode 100644 index 0000000000..5a912d545b --- /dev/null +++ b/development/avrdude/doinst.sh @@ -0,0 +1,14 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/avrdude.conf.new -- cgit v1.2.3