Skip to content

Commit

Permalink
Move replit startup commands to their own script
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benbusby committed Mar 22, 2023
1 parent 076948d commit 5ae9160
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .replit
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 5 additions & 0 deletions misc/replit.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 5ae9160

Please sign in to comment.