summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/cgit-clear-cache.nix
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-09-04 20:40:20 +0200
committerlassulus <lass@blue.r>2018-09-04 20:40:20 +0200
commite183bb1c80c42131f9e3d932985e413ef457f77a (patch)
treef728e5c1a97550d12de72af3a63740ddca69b975 /krebs/5pkgs/simple/cgit-clear-cache.nix
parent8760874b7a7a746d5dd0bf179bd41e9e2291bb77 (diff)
parent000f2a7c9123fcd4b110c6c220570758d556c837 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/simple/cgit-clear-cache.nix')
-rw-r--r--krebs/5pkgs/simple/cgit-clear-cache.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/cgit-clear-cache.nix b/krebs/5pkgs/simple/cgit-clear-cache.nix
new file mode 100644
index 000000000..28402c39c
--- /dev/null
+++ b/krebs/5pkgs/simple/cgit-clear-cache.nix
@@ -0,0 +1,8 @@
+with import <stockholm/lib>;
+
+{ cache-root ? "/tmp/cgit", findutils, writeDashBin }:
+
+writeDashBin "cgit-clear-cache" ''
+ set -efu
+ ${findutils}/bin/find ${shell.escape cache-root} -type f -delete
+''