summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-11-26 19:53:55 +0100
committerlassulus <lassulus@lassul.us>2020-11-26 19:53:55 +0100
commit170d54681b0e589afde00f082e506f692e1c9d25 (patch)
tree65f444fb4cb1d1dea9053fa03dadce29a4685d70
parent813eefa3c55fd1cd234b0adb1da7286bd761b579 (diff)
realwallpaper: keep old markers if new ones are empty
-rw-r--r--krebs/5pkgs/simple/realwallpaper/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix
index 72a314ba9..56a7dfb98 100644
--- a/krebs/5pkgs/simple/realwallpaper/default.nix
+++ b/krebs/5pkgs/simple/realwallpaper/default.nix
@@ -108,7 +108,10 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
'https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD14A1_E_FIRE') &
# regular fetches
- fetch marker.json "$marker_url" &
+ fetch marker.json.tmp "$marker_url"
+ if [ -s marker.json.tmp ]; then
+ mv marker.json.tmp marker.json
+ fi
fetch sun-raw.jpg 'https://sdo.gsfc.nasa.gov/assets/img/latest/latest_512_0171.jpg' &
wait