OSDN Git Service

[update] : global var
authorhayao <shun819.mail@gmail.com>
Thu, 6 Aug 2020 08:18:49 +0000 (17:18 +0900)
committerhayao <shun819.mail@gmail.com>
Thu, 6 Aug 2020 08:18:49 +0000 (17:18 +0900)
build.sh
default.conf

index a4458e6..149fecc 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -714,12 +714,11 @@ show_settings() {
 # Setup custom pacman.conf with current cache directories.
 make_pacman_conf() {
     _msg_debug "Use ${build_pacman_conf}"
-    local pacman_cache_dir="$(fullpath ${work_dir})/pacman/cache"
-    local pacman_db_dir="$(fullpath ${work_dir})/pacman/db"
-    local pacman_log="$(fullpath ${work_dir})/pacman.log"
 
+    # Prepare dir
     mkdir -p "${pacman_cache_dir}"
     mkdir -p "${pacman_db_dir}"
+    mkdir -p "$(dirname "${pacman_log}")"
 
     sed -r "s|^#?\\s*CacheDir.+|CacheDir    = ${pacman_cache_dir}|g;
             s|^#?\\s*DBPath.+|DBPath      = ${pacman_db_dir}|g;
index 61c588d..f4c31b4 100644 (file)
@@ -106,6 +106,12 @@ sfs_comp="zstd"
 sfs_comp_opt=""
 
 
+#-- pacman config --#
+pacman_cache_dir="$(fullpath ${work_dir})/pacman/cache/"
+pacman_db_dir="$(fullpath ${work_dir})/pacman/db/"
+pacman_log="$(fullpath ${work_dir})/pacman.log"
+
+
 #-- Live environment user --#
 
 # Set the default live environment user name