From 5ae9160d380f7188a281b70b5665e51937e5f467 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 22 Mar 2023 13:05:17 -0600 Subject: [PATCH] Move replit startup commands to their own script The .replit file gets autofilled with a ton of garbage when Whoogle is imported, including a required "entrypoint" field that defaults to "main.py" (even though the run and onBoot fields were already included and should negate the need to specify an entrypoint, but whatever). I'm not going to restructure Whoogle to fit what Replit wants, so I've moved the startup commands to their own script (misc/replit.py) and updated the "entrypoint" field in .replit. --- .replit | 4 +--- misc/replit.py | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 misc/replit.py diff --git a/.replit b/.replit index beae184..d1c9f6f 100644 --- a/.replit +++ b/.replit @@ -1,3 +1 @@ -language = "bash" -run = ["killall", "-q", "python3", ">", "/dev/null", "2>&1;", "pip", "install", "-r", "requirements.txt", "&&", "./run"] -onBoot = ["killall", "-q", "python3", ">", "/dev/null", "2>&1;", "pip", "install", "-r", "requirements.txt", "&&", "./run"] +entrypoint = "misc/replit.py" diff --git a/misc/replit.py b/misc/replit.py new file mode 100644 index 0000000..ce222c7 --- /dev/null +++ b/misc/replit.py @@ -0,0 +1,5 @@ +import subprocess + +# A plague upon Replit and all who have built it +replit_cmd = "killall -q python3 > /dev/null 2>&1; pip install -r requirements.txt && ./run" +subprocess.run(replit_cmd, shell=True)