From 96bdb8fe18c7f0f2053485e27c3805f3fc63233a Mon Sep 17 00:00:00 2001 From: Mara3l Date: Thu, 16 May 2024 22:45:40 +0200 Subject: [PATCH] TRIVIAL: generate.sh fix --- scripts/generate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index ad36b408e..17ce5ee4b 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -73,7 +73,11 @@ for branch in "${branches_to_process[@]}" ; do else # number of path segments to throw away by tar: content/en/x.y => 3 strip_count=3 - src_section=docs + if git ls-tree -d "$branch" -- "content/en/docs" | grep -q "content/en/docs"; then + src_section=docs + else + src_section=latest + fi fi if [ "$target_section" == "$current_section" ] ; then # copy the current docs to proper section