mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-10-05 20:27:20 +03:00
docs: clean after serve
Don't pollute the tmpdir with old versions of the serve
This commit is contained in:
parent
4471f09b22
commit
90beb2b579
@ -3,8 +3,11 @@
|
||||
packages.docs = pkgs.runCommand "nixos-anywhere-docs"
|
||||
{
|
||||
passthru.serve = pkgs.writeShellScriptBin "serve" ''
|
||||
set -euo pipefail
|
||||
cd docs
|
||||
${lib.getExe pkgs.mdbook} serve --dest-dir $(${pkgs.coreutils}/bin/mktemp -d)
|
||||
workdir=$(${pkgs.coreutils}/bin/mktemp -d)
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
${lib.getExe pkgs.mdbook} serve --dest-dir "$workdir"
|
||||
'';
|
||||
}
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user