From f9d95f812b53fcb365522babe39d518b01a7b624 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 21 Apr 2018 14:20:40 +0200 Subject: wip --- refresh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 refresh (limited to 'refresh') diff --git a/refresh b/refresh new file mode 100755 index 0000000..eb12cb1 --- /dev/null +++ b/refresh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +file=$1 +key=$2 +value=$3 + +if [[ -r $file ]] +then + old=$(<"$file") +fi + +if [[ $value != $old ]] +then + echo $value > $file + echo Changed: $key +fi -- cgit v1.2.3