Ensure output pkgs dir exists on build

This commit is contained in:
Stephen Seo 2022-06-04 16:58:18 +09:00
parent 616f82e469
commit 86216d4553

View file

@ -15,6 +15,7 @@ import time
import shutil import shutil
import getpass import getpass
import tempfile import tempfile
from pathlib import Path
#SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) #SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
SUDO_PROC = False SUDO_PROC = False
@ -848,6 +849,10 @@ def update_pkg_list(
pkg_state[pkg]["build_status"] = "success" pkg_state[pkg]["build_status"] = "success"
log_print("Ensuring pkgs directory exists...")
if not os.path.exists(other_state['pkg_out_dir']):
pkg_out_dir_path = Path(other_state['pkg_out_dir'])
pkg_out_dir_path.mkdir(parents=True)
log_print("Moving pkg to pkgs directory...") log_print("Moving pkg to pkgs directory...")
for f in pkg_list: for f in pkg_list:
log_print(f'Moving "{f}"...') log_print(f'Moving "{f}"...')