oto/lib/cli/commands/scheduler/scheduler_linux.dart
2025-01-01 10:43:29 +09:00

21 lines
686 B
Dart

// ignore_for_file: depend_on_referenced_packages
import 'dart:io';
import 'package:oto_cli/cli/commands/scheduler/scheduler_manager.dart';
import 'package:path/path.dart' as path;
class SchedulerLinux extends SchedulerManager {
@override
String get exePath {
//home/linuxbrew/.linuxbrew/Cellar/oto/0.0.273/bin/oto
var exe = Platform.resolvedExecutable;
if (exe.contains('.linuxbrew')) {
var rootPath = 'home/linuxbrew/.linuxbrew/Cellar/oto/0.0.273/bin/oto';
var index = rootPath.indexOf('.linuxbrew');
rootPath = rootPath.substring(0, index);
exe = '$rootPath.linuxbrew/bin/${path.basenameWithoutExtension(exe)}';
}
return exe;
}
}