diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-04-24 09:23:08 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-04-24 09:23:08 +0200 |
commit | f64b81fed9702c41af4cec14d91f38ce5ad3384e (patch) | |
tree | 63e91bbcd80c75f2239e7313284fcc9b1f42f22d /slides/refresh | |
parent | 83f6af8f26bd51844d5e83640e81d9d80dc467d4 (diff) | |
download | iot-workshop-ndc-2018-f64b81fed9702c41af4cec14d91f38ce5ad3384e.tar.gz iot-workshop-ndc-2018-f64b81fed9702c41af4cec14d91f38ce5ad3384e.tar.bz2 iot-workshop-ndc-2018-f64b81fed9702c41af4cec14d91f38ce5ad3384e.tar.xz iot-workshop-ndc-2018-f64b81fed9702c41af4cec14d91f38ce5ad3384e.zip |
o Moving everything under slides.
Diffstat (limited to 'slides/refresh')
-rwxr-xr-x | slides/refresh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/slides/refresh b/slides/refresh new file mode 100755 index 0000000..eb12cb1 --- /dev/null +++ b/slides/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 |