18 lines
523 B
Python
18 lines
523 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Copy the updated txt file over the original yml file."""
|
||
|
|
import shutil
|
||
|
|
import os
|
||
|
|
|
||
|
|
src = "/opt/data/projects/gortium/compose/ai/compose_updated.txt"
|
||
|
|
dst = "/opt/data/projects/gortium/compose/ai/compose.yml"
|
||
|
|
|
||
|
|
# Check src exists
|
||
|
|
print(f"Source exists: {os.path.exists(src)}")
|
||
|
|
print(f"Source size: {os.path.getsize(src)} bytes")
|
||
|
|
print(f"Destination exists: {os.path.exists(dst)}")
|
||
|
|
|
||
|
|
# Copy
|
||
|
|
shutil.copy2(src, dst)
|
||
|
|
print(f"Copied {src} -> {dst}")
|
||
|
|
print(f"Destination size: {os.path.getsize(dst)} bytes")
|