This commit is contained in:
bender
2023-11-12 00:10:13 -05:00
parent d6410e4ab0
commit b1d02cff7b
27 changed files with 506 additions and 403 deletions
+27
View File
@@ -0,0 +1,27 @@
import sys
import os
import subprocess
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, parent_dir)
from XML_JSON.json_scripts import json_to_env
from XML_JSON.json_scripts import load_config
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
config_path = os.path.join(parent_dir, 'config.json')
config = load_config(config_path)
BASH_SCRIPT_PATH = './ODM_Handling/overdrivedelete.sh'
def run_chbrown_overdrive(bash_script_path):
subprocess.run(['chmod', '+x', bash_script_path]) #Make overdrivedelete.sh executable
subprocess.run(bash_script_path, shell=True, executable='/bin/bash', env=os.environ)
def unpack_and_move():
# Load the configuration from JSON into environment variables
json_to_env(config_path)
# Run the Bash script
run_chbrown_overdrive(BASH_SCRIPT_PATH)