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

Function generateLinuxInstallScript

src/lib/script-generator.ts:125–149  ·  view source on GitHub ↗
(
  distro: string,
  result: GenerateCommandResponse
)

Source from the content-addressed store, hash-verified

123 * Generate a Linux/Unix bash install script
124 */
125export function generateLinuxInstallScript(
126 distro: string,
127 result: GenerateCommandResponse
128): { content: string; filename: string } {
129 const isNixOS = distro === 'nixos';
130 const shebang = isNixOS ? '#!/run/current-system/sw/bin/bash' : '#!/bin/bash';
131
132 const content = [
133 shebang,
134 '',
135 '# Display colorful LINITE ASCII art banner',
136 ...generateLinuxBanner('📦 Bulk Package Installer'),
137 '',
138 ...(result.setupCommands || []),
139 '',
140 ...result.commands,
141 '',
142 ...generateVerificationCommands(result.breakdown),
143 ].join('\n');
144
145 return {
146 content,
147 filename: 'linite-install.sh',
148 };
149}
150
151/**
152 * Generate a Windows PowerShell install script with colorful LINITE ASCII art

Callers 1

handleDownloadFunction · 0.90

Calls 2

generateLinuxBannerFunction · 0.85

Tested by

no test coverage detected