Starting to make progress
This commit is contained in:
parent
bfa55d1492
commit
2190ccd475
7 changed files with 1395 additions and 52 deletions
31
test.py
Normal file
31
test.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/env python3
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def local(*args):
|
||||
subprocess.run(list(args), check=True)
|
||||
|
||||
|
||||
def ssh(remote, *args):
|
||||
subprocess.run(["ssh", remote] + list(args), check=True, capture_output=True)
|
||||
|
||||
|
||||
def main(args):
|
||||
local("cargo", "build")
|
||||
|
||||
remote = args[1]
|
||||
print(f"Copying file to {remote}...")
|
||||
subprocess.run(
|
||||
["scp", "target/debug/fwd", f"{remote}:bin/fwd"],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
|
||||
print(f"Starting process...")
|
||||
subprocess.run(["target/debug/fwd", remote])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv)
|
||||
Loading…
Add table
Add a link
Reference in a new issue