( distro: string, result: GenerateCommandResponse )
| 123 | * Generate a Linux/Unix bash install script |
| 124 | */ |
| 125 | export 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 |
no test coverage detected