diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-04-21 14:20:40 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-04-21 14:20:40 +0200 |
commit | f9d95f812b53fcb365522babe39d518b01a7b624 (patch) | |
tree | 4ce70660cfa8f146e11dfd153d83ec9a22dc01e0 /refresh | |
parent | a1035c3f39c0952e09571be076bf6a4cb2fb966c (diff) | |
download | iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.tar.gz iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.tar.bz2 iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.tar.xz iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.zip |
wip
Diffstat (limited to 'refresh')
-rwxr-xr-x | refresh | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |