create a central folder for all lib data files
This commit is contained in:
@@ -86,9 +86,11 @@ def install(args):
|
|||||||
print_error_message(f"Failed to install [b]{name}[/]: build failed: \"{e.stderr.decode()}\"")
|
print_error_message(f"Failed to install [b]{name}[/]: build failed: \"{e.stderr.decode()}\"")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
lib_data_path = os.path.join(libs_path, name)
|
data_path = os.path.join(libs_path, "lib_data")
|
||||||
|
|
||||||
|
lib_data_path = os.path.join(data_path, name)
|
||||||
if not os.path.isdir(lib_data_path):
|
if not os.path.isdir(lib_data_path):
|
||||||
subprocess.run(["sudo", "mkdir", lib_data_path], check=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
|
subprocess.run(["sudo", "mkdir", "-p", lib_data_path], check=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
subprocess.run(["sudo", "cp", os.path.join(temp_dir, "rock.json"), os.path.join(lib_data_path, "rock.json")], check=True)
|
subprocess.run(["sudo", "cp", os.path.join(temp_dir, "rock.json"), os.path.join(lib_data_path, "rock.json")], check=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user