summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-07 08:09:07 +0100
committertv <tv@krebsco.de>2016-02-07 08:09:07 +0100
commitee5a1ddffe51117862f7e2669f3939dd165d5686 (patch)
tree183d10eb123eb6f7067b2ff91401d3685970e166 /tv
parent698296eb8c986127e0fb195a51b3adf3f31eeedf (diff)
tv vim: simplify wrapper
Diffstat (limited to 'tv')
-rw-r--r--tv/2configs/vim.nix10
1 files changed, 3 insertions, 7 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 8a6299a39..69a880dab 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -44,13 +44,9 @@ let
alldirs = attrValues dirs ++ map dirOf (attrValues files);
in unique (sort lessThan alldirs);
- vim = pkgs.writeScriptBin "vim" ''
- #! ${pkgs.dash}/bin/dash
- set -f
- umask=$(umask)
- umask 0077
- ${concatStringsSep "\n" (map (x: "mkdir -p ${x}") mkdirs)}
- umask "$umask"
+ vim = pkgs.writeDashBin "vim" ''
+ set -efu
+ (umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString mkdirs})
exec ${pkgs.vim}/bin/vim "$@"
'';