compressCommand method
This command is used to compress a folder
since we can use tar command in powershell in windows 10 and above we can use the same command for windows, linux and macos
Implementation
List<String> compressCommand({
String compressedFileName = 'archive.tar.gz',
String source = '.',
bool lastCommand = false,
List<String> exclude = const [],
}) =>
[
'tar',
'-czvf',
compressedFileName,
if (exclude.isNotEmpty) ...exclude.map((e) => '--exclude=\'$e\''),
source,
lastCommand ? '' : ';',
];