summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-10-17 20:06:16 +0200
committertv <tv@krebsco.de>2017-10-17 20:06:16 +0200
commit27d37b22995c469048e2ae4dc8ff46f49b3542d7 (patch)
tree2222cbffaf4c7ac053048635727e9335ffe22b39 /krebs/5pkgs/simple
parenta15736cbb0f23e74b47decc363a4cbf45850a0c4 (diff)
withGetopt: export WITHGETOPT_ORIG_ARGS
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r--krebs/5pkgs/simple/withGetopt.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/withGetopt.nix b/krebs/5pkgs/simple/withGetopt.nix
index 196e6765a..179051bdf 100644
--- a/krebs/5pkgs/simple/withGetopt.nix
+++ b/krebs/5pkgs/simple/withGetopt.nix
@@ -1,5 +1,5 @@
with import <stockholm/lib>;
-{ utillinux, writeDash }:
+{ coreutils, quote, utillinux, writeDash }:
opt-spec: cmd-spec: let
@@ -43,6 +43,9 @@ in writeDash wrapper-name ''
unset ${opt.varname}
'') opts)}
+ WITHGETOPT_ORIG_ARGS=$(${quote}/bin/quote "$@")
+ export WITHGETOPT_ORIG_ARGS
+
args=$(${utillinux}/bin/getopt \
-l ${shell.escape
(concatMapStringsSep ","