OSDN Git Service

[fix] : FIxed gpg
authorhayao <hayao@fascode.net>
Mon, 12 Apr 2021 01:05:07 +0000 (10:05 +0900)
committerhayao <hayao@fascode.net>
Mon, 12 Apr 2021 01:05:07 +0000 (10:05 +0900)
build.sh

index 24a6065..90e639b 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -356,9 +356,6 @@ prepare_env() {
     isofs_dir="${build_dir}/iso"
     lockfile_dir="${build_dir}/lockfile"
 
-    # Create dir
-    mkdir -p "${airootfs_dir}" "${cache_dir}"
-
     # Check packages
     if [[ "${nodepend}" = false ]]; then
         local _check_failed=false _pkg _result=0
@@ -392,6 +389,16 @@ prepare_env() {
         _run_cleansh
     fi
 
+    # Create dir
+    mkdir -p "${airootfs_dir}" "${cache_dir}"
+
+    # Set gpg key
+    if [[ -n "${gpg_key}" ]]; then
+        gpg --batch --output "${work_dir}/pubkey.gpg" --export "${gpg_key}"
+        exec {ARCHISO_GNUPG_FD}<>"${build_dir}/pubkey.gpg"
+        export ARCHISO_GNUPG_FD
+    fi
+
     # 強制終了時に作業ディレクトリを削除する
     local _trap_remove_work
     _trap_remove_work() {