Skip to content

Commit

Permalink
fix: install.sh on cloned repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ginifizz committed Oct 15, 2024
1 parent d4b8773 commit c215aa8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion clone-documentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,19 @@ function generateLangDocumentation($repoURL, $lang = "en")
rename($DOCS_DESTINATION . "/CONTRIBUTING.md", $DOCS_DESTINATION . "/contributing.md");
}

// handle install sh
if ($lang === "en") {
$INSTALLSH = $TEMP_DIR . "/install.sh";

if (file_get_contents($INSTALLSH)) {
$success = copy($INSTALLSH, __DIR__ . "/static/install.sh");
if (!$success) {
echo "Error when copying install.sh\n";
return;
}
}
}


/* handle index / README file */
$README_SOURCE = $TEMP_DIR . ($lang === "en" ? "" : "/docs/" . $lang) . "/README.md";
Expand Down Expand Up @@ -292,6 +305,5 @@ function copyInstallSh(): void
generateLangDocumentation($repoURL, "cn");
generateLangDocumentation($repoURL, "fr");
generateLangDocumentation($repoURL, "tr");
copyInstallSh();

?>

0 comments on commit c215aa8

Please sign in to comment.