MCPcopy Create free account
hub / github.com/Sagyam/linite / buildScriptCommand

Function buildScriptCommand

src/services/command-generator-shared.ts:400–414  ·  view source on GitHub ↗
(scriptUrl: string, os: 'windows' | 'linux')

Source from the content-addressed store, hash-verified

398 * SHARED between install and uninstall generators (IDENTICAL logic)
399 */
400export function buildScriptCommand(scriptUrl: string, os: 'windows' | 'linux'): string {
401 if (os === 'windows') {
402 // Windows PowerShell command
403 if (scriptUrl.endsWith('.exe')) {
404 // Direct download and run executable
405 return `irm ${scriptUrl} -OutFile installer.exe; .\\installer.exe`;
406 } else {
407 // Run script directly
408 return `irm ${scriptUrl} | iex`;
409 }
410 } else {
411 // Linux curl command
412 return `curl -fsSL ${scriptUrl} | bash`;
413 }
414}

Callers 1

generateInstallCommandsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected