[arch-releng] Verbose

Mr Green mrgreen at archbang.org
Sat Aug 1 07:05:31 UTC 2020


Could the verbose option be streamlined in build.sh?

Currently we have:

# Packages (airootfs)
make_packages() {
    if [[ "${gpg_key}" ]]; then
      gpg --export "${gpg_key}" > "${work_dir}/gpgkey"
      exec 17<>"${work_dir}/gpgkey"
    fi
    if [ -n "${verbose}" ]; then
        ARCHISO_GNUPG_FD="${gpg_key:+17}" mkarchiso -v -w
"${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
            -p "$(grep -h -v '^#' "${script_path}/packages.x86_64"| sed
':a;N;$!ba;s/\n/ /g')" install
    else
        ARCHISO_GNUPG_FD="${gpg_key:+17}" mkarchiso -w "${work_dir}/x86_64"
-C "${work_dir}/pacman.conf" -D "${install_dir}" \
            -p "$(grep -h -v '^#' "${script_path}/packages.x86_64"| sed
':a;N;$!ba;s/\n/ /g')" install
    fi
    if [[ "${gpg_key}" ]]; then
      exec 17<&-
    fi
}

In place of the -v could you not just have ${verbose} this would remove 5
lines of code (if statement) plus many other statements in script?

MrG


More information about the arch-releng mailing list