fi
echo -ne " ${_channel}"
for _b in $( seq 1 $(( ${blank} - 4 - ${#_channel} )) ); do echo -ne " "; done
- if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" == "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
+ if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
echo -ne "$( echo_color -t '31' 'ERROR:') Not compatible with AlterISO3\n"
elif [[ -f "${script_path}/channels/${_dirname}/description.txt" ]]; then
echo -ne "$(cat "${script_path}/channels/${_dirname}/description.txt")\n"
local _lang _count=0
for _lang in ${_locale_name_list[@]}; do
_count=$(( _count + 1 ))
- if [[ "${_lang}" == "${locale_name}" ]]; then echo "${_count}"; return 0; fi
+ if [[ "${_lang}" = "${locale_name}" ]]; then echo "${_count}"; return 0; fi
done
echo -n "failed"
}
_locale_line_number="$(_get_locale_line_number)"
# 不正なロケール名なら終了する
- [[ "${_locale_line_number}" == "failed" ]] && msg_error "${locale_name} is not a valid language." "1"
+ [[ "${_locale_line_number}" = "failed" ]] && msg_error "${locale_name} is not a valid language." "1"
# ロケール設定ファイルから該当の行を抽出
_locale_config_line=($(cat "${_locale_config_file}" | grep -h -v ^'#' | grep -v ^$ | head -n "${_locale_line_number}" | tail -n 1))
local _kernel _count=0
for _kernel in ${_kernel_name_list[@]}; do
_count=$(( _count + 1 ))
- if [[ "${_kernel}" == "${kernel}" ]]; then echo "${_count}"; return 0; fi
+ if [[ "${_kernel}" = "${kernel}" ]]; then echo "${_count}"; return 0; fi
done
echo -n "failed"
return 0
_kernel_line="$(_get_kernel_line)"
# 不正なカーネル名なら終了する
- [[ "${_kernel_line}" == "failed" ]] && msg_error "Invalid kernel ${kernel}" "1"
+ [[ "${_kernel_line}" = "failed" ]] && msg_error "Invalid kernel ${kernel}" "1"
# カーネル設定ファイルから該当の行を抽出
_kernel_config_line=($(cat "${_kernel_config_file}" | grep -h -v ^'#' | grep -v ^$ | head -n "${_kernel_line}" | tail -n 1))
n) echo_opts="-n -e" ;;
esac
done
- shift $((OPTIND - 1))
+ shift "$((OPTIND - 1))"
if [[ "${nocolor}" = false ]]; then
echo ${echo_opts} "\e[$([[ -v backcolor ]] && echo -n "${backcolor}"; [[ -v textcolor ]] && echo -n ";${textcolor}"; [[ -v decotypes ]] && echo -n ";${decotypes}")m${*}\e[m"
else
n) echo_opts="${echo_opts} -n" ;;
esac
done
- shift $((OPTIND - 1))
+ shift "$((OPTIND - 1))"
echo ${echo_opts} "$( echo_color -t '36' '[build.sh]') $( echo_color -t '32' 'Info') ${*}"
if [[ "${bash_debug}" = true ]]; then
set -xv
n) echo_opts="${echo_opts} -n" ;;
esac
done
- shift $((OPTIND - 1))
+ shift "$((OPTIND - 1))"
echo ${echo_opts} "$( echo_color -t '36' '[build.sh]') $( echo_color -t '33' 'Warning') ${*}" >&2
if [[ "${bash_debug}" = true ]]; then
set -xv
n) echo_opts="${echo_opts} -n" ;;
esac
done
- shift $((OPTIND - 1))
+ shift "$((OPTIND - 1))"
if [[ ${debug} = true ]]; then
echo ${echo_opts} "$( echo_color -t '36' '[build.sh]') $( echo_color -t '35' 'Debug') ${*}"
fi
n) echo_opts="${echo_opts} -n" ;;
esac
done
- shift $((OPTIND - 1))
+ shift "$((OPTIND - 1))"
echo ${echo_opts} "$( echo_color -t '36' '[build.sh]') $( echo_color -t '31' 'Error') ${1}" >&2
if [[ -n "${2:-}" ]]; then
exit ${2}
fi
echo -ne " ${_channel}"
for _b in $( seq 1 $(( ${blank} - 4 - ${#_channel} )) ); do echo -ne " "; done
- if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" == "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
+ if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
echo -ne "$( echo_color -t '31' 'ERROR:') Not compatible with AlterISO3\n"
elif [[ -f "${script_path}/channels/${_dirname}/description.txt" ]]; then
echo -ne "$(cat "${script_path}/channels/${_dirname}/description.txt")\n"
}
trap '_trap_remove_work' 1 2 3 15
- if [[ "${rebuild}" == false ]]; then
+ if [[ "${rebuild}" = false ]]; then
# If there is pacman.conf for each channel, use that for building
if [[ -f "${script_path}/channels/${channel_name}/pacman-${arch}.conf" ]]; then
build_pacman_conf="${script_path}/channels/${channel_name}/pacman-${arch}.conf"
# edk2-shell based UEFI shell
# shellx64.efi is picked up automatically when on /
- if [[ "${arch}" == "x86_64" ]]; then
+ if [[ "${arch}" = "x86_64" ]]; then
cp "${work_dir}/${arch}/airootfs/usr/share/edk2-shell/x64/Shell_Full.efi" "${work_dir}/iso/shellx64.efi"
fi
}
"${script_path}/efiboot/loader/entries/archiso-cd.conf" > "${work_dir}/efiboot/loader/entries/archiso-${arch}.conf"
# shellx64.efi is picked up automatically when on /
- if [[ "${arch}" == "x86_64" ]]; then
+ if [[ "${arch}" = "x86_64" ]]; then
cp "${work_dir}/iso/shellx64.efi" "${work_dir}/efiboot/"
fi
local _lang _count=0
for _lang in ${_locale_name_list[@]}; do
_count=$(( _count + 1 ))
- if [[ "${_lang}" == "${locale_name}" ]]; then echo "${_count}"; return 0; fi
+ if [[ "${_lang}" = "${locale_name}" ]]; then echo "${_count}"; return 0; fi
done
echo -n "failed"
}
_locale_line_number="$(_get_locale_line_number)"
# 不正なロケール名なら終了する
- [[ "${_locale_line_number}" == "failed" ]] && msg_error "${locale_name} is not a valid language." "1"
+ [[ "${_locale_line_number}" = "failed" ]] && msg_error "${locale_name} is not a valid language." "1"
# ロケール設定ファイルから該当の行を抽出
_locale_config_line=($(cat "${_locale_config_file}" | grep -h -v ^'#' | grep -v ^$ | head -n "${_locale_line_number}" | tail -n 1))
local _kernel _count=0
for _kernel in ${_kernel_name_list[@]}; do
_count=$(( _count + 1 ))
- if [[ "${_kernel}" == "${kernel}" ]]; then echo "${_count}"; return 0; fi
+ if [[ "${_kernel}" = "${kernel}" ]]; then echo "${_count}"; return 0; fi
done
echo -n "failed"
return 0
_kernel_line="$(_get_kernel_line)"
# 不正なカーネル名なら終了する
- [[ "${_kernel_line}" == "failed" ]] && msg_error "Invalid kernel ${kernel}" "1"
+ [[ "${_kernel_line}" = "failed" ]] && msg_error "Invalid kernel ${kernel}" "1"
# カーネル設定ファイルから該当の行を抽出
_kernel_config_line=($(cat "${_kernel_config_file}" | grep -h -v ^'#' | grep -v ^$ | head -n "${_kernel_line}" | tail -n 1))
fi
# Check channel version
-if [[ ! "${channel_name}" == "rebuild" ]]; then
+if [[ ! "${channel_name}" = "rebuild" ]]; then
msg_debug "channel path is ${script_path}/channels/${channel_name}"
if [[ ! "$(cat "${script_path}/channels/${channel_name}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
msg_error "This channel does not support AlterISO 3." "1"
_msg_info "Creating ext4 image of 32GiB..."
truncate -s 32G "${work_dir}/airootfs.img"
local _qflag=""
- if [[ ${quiet} == "y" ]]; then
+ if [[ ${quiet} = "y" ]]; then
_qflag="-q"
fi
mkfs.ext4 ${_qflag} -O ^has_journal,^resize_inode -E lazy_itable_init=0 -m 0 -F "${work_dir}/airootfs.img"
mkdir -p "${out_dir}"
_msg_info "Creating ISO image..."
local _qflag=""
- if [[ ${quiet} == "y" ]]; then
+ if [[ ${quiet}"y" ]]; then
_qflag="-quiet"
fi
xorriso -as mkisofs ${_qflag} \
_msg_info "Creating tarball..."
local _vflag=""
- if [[ ${quiet} == "n" ]]; then
+ if [[ "${quiet}" = "n" ]]; then
_vflag="-v"
fi
_show_config prepare
_cleanup
- if [[ ${sfs_mode} == "sfs" ]]; then
+ if [[ "${sfs_mode}" = "sfs" ]]; then
_mkairootfs_sfs
else
_mkairootfs_img