OSDN Git Service

added cache
authorkokkiemouse <kokkiemouse@gmail.com>
Sat, 26 Sep 2020 23:18:11 +0000 (08:18 +0900)
committerkokkiemouse <kokkiemouse@gmail.com>
Sat, 26 Sep 2020 23:18:11 +0000 (08:18 +0900)
Signed-off-by: kokkiemouse <kokkiemouse@gmail.com>
lfbs

diff --git a/lfbs b/lfbs
index 9b7e1b7..a74dd25 100755 (executable)
--- a/lfbs
+++ b/lfbs
@@ -252,6 +252,9 @@ _usage () {
 }
 
 dnfstrap() {
+    if [[ ! -d "${cache_dir}" ]]; then
+        mkdir -p "${cache_dir}"
+    fi
     sed -e "s/%CACHEDIR%/${cache_dir}/g" "${script_path}/system/dnfconf-temp.conf" > "${work_dir}/dnf_conf"
     dnf -c "${work_dir}/dnf_conf" --installroot="${work_dir}/airootfs" $(${script_path}/system/repository-json-parser.py ${script_path}/system/repository.json) install ${@} -y
 }