summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/cgit-clear-cache.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-08-28 20:58:23 +0200
committertv <tv@krebsco.de>2018-08-28 22:01:31 +0200
commit23d2950ed7d60aaa066a437b4aaffbf55a76c036 (patch)
tree16da03af09f9d72604a591c725c8ac4cc5fd554f /krebs/5pkgs/simple/cgit-clear-cache.nix
parentce31457b77a65d36893d622b5e1061284e90bf2d (diff)
cgit-clear-cache: init
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
+''