summaryrefslogtreecommitdiffstats
path: root/ham/rtl_433/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ham/rtl_433/doinst.sh')
-rw-r--r--ham/rtl_433/doinst.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ham/rtl_433/doinst.sh b/ham/rtl_433/doinst.sh
new file mode 100644
index 0000000000..2dd0059991
--- /dev/null
+++ b/ham/rtl_433/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+shopt -s nullglob
+for i in etc/rtl_433/*.conf.new; do config "${i}"; done