mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
Enhance getInstallCommand to support Alpine variant in InstallCommand component (#281)
This commit is contained in:
parent
36b9452ed7
commit
ea559e7018
@ -4,8 +4,8 @@ import { basePath } from "@/config/siteConfig";
|
|||||||
import { Script } from "@/lib/types";
|
import { Script } from "@/lib/types";
|
||||||
import { getDisplayValueFromType } from "../ScriptInfoBlocks";
|
import { getDisplayValueFromType } from "../ScriptInfoBlocks";
|
||||||
|
|
||||||
const getInstallCommand = (scriptPath?: string) => {
|
const getInstallCommand = (scriptPath?: string, isAlpine = false) => {
|
||||||
return `bash -c "$(wget -qLO - https://github.com/community-scripts/${basePath}/raw/main/${scriptPath})"`;
|
return `bash -c "$(wget -q${isAlpine ? "" : "L"}O - https://github.com/community-scripts/${basePath}/raw/main/${scriptPath})"`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function InstallCommand({ item }: { item: Script }) {
|
export default function InstallCommand({ item }: { item: Script }) {
|
||||||
@ -67,7 +67,7 @@ export default function InstallCommand({ item }: { item: Script }) {
|
|||||||
<TabsContent value="alpine">
|
<TabsContent value="alpine">
|
||||||
{renderInstructions(true)}
|
{renderInstructions(true)}
|
||||||
<CodeCopyButton>
|
<CodeCopyButton>
|
||||||
{getInstallCommand(alpineScript.script)}
|
{getInstallCommand(alpineScript.script, true)}
|
||||||
</CodeCopyButton>
|
</CodeCopyButton>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
Loading…
Reference in New Issue
Block a user