aboutsummaryrefslogtreecommitdiff
path: root/ham/rtl_433/doinst.sh
diff options
context:
space:
mode:
authorpyllyukko <pyllyukko@maimed.org>2024-03-13 06:43:49 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-03-13 06:49:48 +0700
commit2ba7a4254380c4a74f5475e2f37f1047d7c299c9 (patch)
tree8c71aa49300720507dcc35327f2f8b4b309acf6c /ham/rtl_433/doinst.sh
parent1538f1a6573a17c53c3d3ef05a562dc46a827915 (diff)
ham/rtl_433: Added (decode radio transmissions).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
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 0000000000000..2dd0059991317
--- /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