Update InstallCommand.tsx
This commit is contained in:
parent
f7b418e7db
commit
3c29fa4201
@ -5,9 +5,13 @@ import { Script } from "@/lib/types";
|
|||||||
import { getDisplayValueFromType } from "../ScriptInfoBlocks";
|
import { getDisplayValueFromType } from "../ScriptInfoBlocks";
|
||||||
|
|
||||||
const getInstallCommand = (scriptPath = "", isAlpine = false) => {
|
const getInstallCommand = (scriptPath = "", isAlpine = false) => {
|
||||||
return `bash -c "$(curl -fsSL https://github.com/community-scripts/${basePath}/raw/main/${scriptPath})"`;
|
const url = `https://github.com/community-scripts/${basePath}/raw/main/${scriptPath}`;
|
||||||
|
return isAlpine
|
||||||
|
? `bash -c "$(curl -fsSL ${url})"`
|
||||||
|
: `bash -c "$(curl -fsSL ${url})"`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export default function InstallCommand({ item }: { item: Script }) {
|
export default function InstallCommand({ item }: { item: Script }) {
|
||||||
const alpineScript = item.install_methods.find(
|
const alpineScript = item.install_methods.find(
|
||||||
(method) => method.type === "alpine",
|
(method) => method.type === "alpine",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user