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

Function generateLinuxUninstallScript

src/lib/script-generator.ts:177–201  ·  view source on GitHub ↗
(
  distro: string,
  result: GenerateUninstallCommandResponse
)

Source from the content-addressed store, hash-verified

175 * Generate a Linux/Unix bash uninstall script
176 */
177export function generateLinuxUninstallScript(
178 distro: string,
179 result: GenerateUninstallCommandResponse
180): { content: string; filename: string } {
181 const isNixOS = distro === 'nixos';
182 const shebang = isNixOS ? '#!/run/current-system/sw/bin/bash' : '#!/bin/bash';
183
184 const content = [
185 shebang,
186 '',
187 '# Display colorful LINITE ASCII art banner',
188 ...generateLinuxBanner('🗑️ Bulk Package Uninstaller', '\\033[1;31m'),
189 '',
190 ...(result.cleanupCommands || []),
191 '',
192 ...result.commands,
193 '',
194 ...(result.dependencyCleanupCommands || []),
195 ].join('\n');
196
197 return {
198 content,
199 filename: 'linite-uninstall.sh',
200 };
201}
202
203/**
204 * Generate a Windows PowerShell uninstall script with colorful LINITE ASCII art

Callers 2

handleDownloadUninstallFunction · 0.90
handleDownloadFunction · 0.90

Calls 1

generateLinuxBannerFunction · 0.85

Tested by

no test coverage detected