From 88b66fe6bcbc569120819f7b138a0df03e36f474 Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Wed, 25 Nov 2020 14:33:00 +0100 Subject: [PATCH] Take path to config file as command-line argument --- secrets | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/secrets b/secrets index abba5b2..41f6850 100755 --- a/secrets +++ b/secrets @@ -223,7 +223,11 @@ EOF (void)) -(let* ([config-file "test/config.json"] - [config (call-with-input-file config-file read-json)]) - (deploy-secrets config (path->complete-path (path-only config-file))) +(define cfg-file (make-parameter #f)) +(command-line + #:args ([config-file "secrets.json"]) + (cfg-file config-file)) + +(let* ([config (call-with-input-file (cfg-file) read-json)]) + (deploy-secrets config (path->complete-path (path-only (cfg-file)))) (displayln "Done."))