pyblock/clone.py
curly60e 6e36f40b4c
Improved code
Better satnode clone.
$HOME folder changed to satellite folder inside pyblock.
2020-06-03 11:10:12 -03:00

29 lines
927 B
Python

import os
import os.path
import time as t
def gitclone():
url = "https://github.com/curly60e/satellite"
os.system("git clone " + url)
os.system("mkdir satellite/api/examples/.gnupg")
#os.system("cp -r $HOME/pyblock/satellite/api/examples $HOME/pyblock/")
os.system("gpg --full-generate-key --homedir satellite/api/examples/.gnupg")
def satnode():
try:
os.system("python3 satellite/api/examples/demo-rx.py &")
t.sleep(5)
os.system("python3 satellite/api/examples/api_data_reader.py --demo --plaintext ")
except (KeyboardInterrupt, SystemExit):
os.system("ps -ef | grep demo-rx.py | grep -v grep | awk '{print $2}' | xargs kill -9")
def matrixsc():
if os.path.isdir('$HOME/pyblock/terminal_matrix'):
print("OK Pass")
else:
url = "https://github.com/curly60e/terminal_matrix.git"
os.system("git clone " + url)