23 lines
589 B
Dart
23 lines
589 B
Dart
import 'dart:core';
|
|
|
|
import 'package:funkblubber/funkblubber.dart' as funkblubber;
|
|
import 'package:funkblubber/console.dart' as console;
|
|
import 'package:funkblubber/parsing/parser.dart' as parser;
|
|
|
|
void main(final List<String> arguments) async {
|
|
final result = parser.extract(arguments);
|
|
if (!result.success) {
|
|
console.error("'funkblubber --help' for more");
|
|
return;
|
|
}
|
|
|
|
final bool success = await funkblubber.download(
|
|
object: result.object!,
|
|
path: result.localPath ?? '.',
|
|
);
|
|
|
|
if (!success) {
|
|
console.error("couldn't execute request successfully.");
|
|
}
|
|
}
|