From 380bb6e6da505f1def6d5a6fcbd26db106cfb021 Mon Sep 17 00:00:00 2001 From: Dimitar Rusev Date: Mon, 4 Mar 2024 01:05:14 +0200 Subject: [PATCH] Automatically detect new binaries --- run.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/run.py b/run.py index efccb83..76520d5 100755 --- a/run.py +++ b/run.py @@ -3,6 +3,7 @@ import argparse import subprocess from os import environ as env +import os parser = argparse.ArgumentParser( prog="weath3rb0i", @@ -10,11 +11,9 @@ epilog="Run `cargo run` for the default", ) -binaries = [ - "weath3rb0i", - "order0", - "ac-over-huffman", -] +binaries_path = os.path.join(os.path.dirname(__file__), './src/bin/') +binaries = os.listdir(binaries_path) +binaries.insert(0, 'weath3rb0i') # Add all parameters globally but only use the ones we require per binary (no checks for extra args) parser.add_argument("bin", type=int, nargs="?", help="Which binary (by id) to run")