From 3ad354f25c6f6017089852168f91204b4e38fd76 Mon Sep 17 00:00:00 2001 From: axtlos Date: Fri, 22 Apr 2022 14:18:06 +0200 Subject: [PATCH] run reflector before calling the backend, fix #16 --- lib/functions/install.dart | 2 +- scripts/jadewrapper.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 scripts/jadewrapper.sh diff --git a/lib/functions/install.dart b/lib/functions/install.dart index 449d0b4..4b0ca6d 100644 --- a/lib/functions/install.dart +++ b/lib/functions/install.dart @@ -11,7 +11,7 @@ test(setOutput, running, setRunning, config, writeToLog) async { await File(filename).writeAsString(config); writeToLog("Json config: $config"); var process = - await Process.start('pkexec', ['jade', 'config', '/tmp/jade.json']); + await Process.start('pkexec', ['/opt/jade_gui/scripts/jadewrapper.sh']); //await Process.start('/opt/jade_gui/scripts/jadeemu.sh', []); process.stdout.transform(utf8.decoder).forEach(setOutput); setRunning(true); diff --git a/scripts/jadewrapper.sh b/scripts/jadewrapper.sh new file mode 100755 index 0000000..0eff9c9 --- /dev/null +++ b/scripts/jadewrapper.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +reflector --latest 5 --sort rate --save /etc/pacman.d/mirrorlist +jade config /tmp/jade.json \ No newline at end of file