Skip to content

Commit

Permalink
Display versioned manuals on nixos.org
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesquembre committed Mar 23, 2023
1 parent 027b2c7 commit 97155d7
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 29 deletions.
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,32 @@ $(NIX_MANUAL_STABLE_OUT): $(call rwildcard, $(NIX_MANUAL_STABLE_IN), *)
mkdir -p $(NIX_MANUAL_STABLE_OUT)
cp --no-preserve=mode,ownership -RL $(NIX_MANUAL_STABLE_IN)/* $(NIX_MANUAL_STABLE_OUT)

NIX_MANUAL_2_12_IN ?= /no-such-path
NIX_MANUAL_2_12_OUT = manual/nix/2.12
$(NIX_MANUAL_2_12_OUT): $(call rwildcard, $(NIX_MANUAL_2_12_IN), *)
mkdir -p $(NIX_MANUAL_2_12_OUT)
cp --no-preserve=mode,ownership -RL $(NIX_MANUAL_2_12_IN)/* $(NIX_MANUAL_2_12_OUT)

NIX_MANUAL_2_11_IN ?= /no-such-path
NIX_MANUAL_2_11_OUT = manual/nix/2.11
$(NIX_MANUAL_2_11_OUT): $(call rwildcard, $(NIX_MANUAL_2_11_IN), *)
mkdir -p $(NIX_MANUAL_2_11_OUT)
cp --no-preserve=mode,ownership -RL $(NIX_MANUAL_2_11_IN)/* $(NIX_MANUAL_2_11_OUT)

NIX_MANUAL_2_10_IN ?= /no-such-path
NIX_MANUAL_2_10_OUT = manual/nix/2.10
$(NIX_MANUAL_2_10_OUT): $(call rwildcard, $(NIX_MANUAL_2_10_IN), *)
mkdir -p $(NIX_MANUAL_2_10_OUT)
cp --no-preserve=mode,ownership -RL $(NIX_MANUAL_2_10_IN)/* $(NIX_MANUAL_2_10_OUT)

NIX_MANUAL_UNSTABLE_IN ?= /no-such-path
NIX_MANUAL_UNSTABLE_OUT = manual/nix/unstable

$(NIX_MANUAL_UNSTABLE_OUT): $(call rwildcard, $(NIX_MANUAL_UNSTABLE_IN), *)
mkdir -p $(NIX_MANUAL_UNSTABLE_OUT)
cp --no-preserve=mode,ownership -RL $(NIX_MANUAL_UNSTABLE_IN)/* $(NIX_MANUAL_UNSTABLE_OUT)

manual/nix/index.html: $(NIX_MANUAL_STABLE_OUT) $(NIX_MANUAL_UNSTABLE_OUT)
manual/nix/index.html: $(NIX_MANUAL_STABLE_OUT) $(NIX_MANUAL_UNSTABLE_OUT) $(NIX_MANUAL_2_12_OUT) $(NIX_MANUAL_2_11_OUT) $(NIX_MANUAL_2_10_OUT)
bash ./scripts/fix-manual-headers.sh manual/nix stable
@echo "<!DOCTYPE html>" > $@
@echo "<html>" >> $@
Expand Down
260 changes: 235 additions & 25 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97155d7

Please sign in to comment.