echo "Checking ${pkg} ..."
case $(check_pkg ${pkg}) in
"old")
- echo "[Warning] ${pkg} is not the latest package."
+ echo "[Warning] ${pkg} is not the latest package." >&2
;;
"not")
- echo "[Error] ${pkg} is not installed."
+ echo "[Error] ${pkg} is not installed." >&2
exit 1
;;
esac
show_settings() {
echo
if [[ "${boot_splash}" = true ]]; then
- echo "Boot splash is enabled."
- echo "Theme is used ${theme_name}."
+ echo "[Info] Boot splash is enabled."
+ echo "[Info] Theme is used ${theme_name}."
fi
- echo "Use the ${kernel} kernel."
- echo "Live username is ${username}."
- echo "Live user password is ${password}."
- echo "The compression method of squashfs is ${sfs_comp}."
+ echo "[Info] Use the ${kernel} kernel."
+ echo "[Info] Live username is ${username}."
+ echo "[Info] Live user password is ${password}."
+ echo "[Info] The compression method of squashfs is ${sfs_comp}."
if [[ $(echo "${channel_name}" | sed 's/^.*\.\([^\.]*\)$/\1/') = "add" ]]; then
- echo "Use the $(echo ${channel_name} | sed 's/\.[^\.]*$//') channel."
+ echo "[Info] Use the $(echo ${channel_name} | sed 's/\.[^\.]*$//') channel."
else
- echo "Use the ${channel_name} channel."
+ echo "[Info] Use the ${channel_name} channel."
fi
- [[ "${japanese}" = true ]] && echo "Japanese mode has been activated."
+ [[ "${japanese}" = true ]] && echo " [Info] Japanese mode has been activated."
echo
echo "Press Enter to continue or Ctrl + C to cancel."
read
#-- Read package list --#
# Read the file and remove comments starting with # and add it to the list of packages to install.
for _file in ${_loadfilelist[@]}; do
- echo "Loaded package file ${_file}."
+ echo "[Info] Loaded package file ${_file}."
pkglist=( ${pkglist[@]} "$(grep -h -v ^'#' ${_file})" )
done
if [[ ${debug} = true ]]; then
remove "${work_dir}/packages.list"
remove "${work_dir}/packages-full.list"
fi
- echo "The password for the live user and root is ${password}."
+ echo "[Info] The password for the live user and root is ${password}."
}
if [[ ${OPTARG} = "gzip" || ${OPTARG} = "lzma" || ${OPTARG} = "lzo" || ${OPTARG} = "lz4" || ${OPTARG} = "xz" || ${OPTARG} = "zstd" ]]; then
sfs_comp="${OPTARG}"
else
- echo "Invalid compressors ${arg}"
+ echo "[Error] Invalid compressors ${arg}" >&2
_usage 1
fi
;;
if [[ -n $(cat ${script_path}/system/kernel_list | grep -h -v ^'#' | grep -x "${OPTARG}") ]]; then
kernel="${OPTARG}"
else
- echo "Invalid kernel ${OPTARG}" >&2
+ echo "[Error] Invalid kernel ${OPTARG}" >&2
_usage 1
fi
;;
if [[ -f "${OPTARG}" ]]; then
source "${OPTARG}"
else
- echo "Invalid configuration file ${OPTARG}." >&2
+ echo "[Error] Invalid configuration file ${OPTARG}." >&2
fi
;;
x) debug=true;;
u) username="${OPTARG}" ;;
h) _usage 0 ;;
*)
- echo "Invalid argument '${arg}'" >&2
+ echo "[Error] Invalid argument '${arg}'" >&2
_usage 1
;;
esac
# Check root.
if [[ ${EUID} -ne 0 ]]; then
- echo "This script must be run as root." >&2
+ echo "[Warning] This script must be run as root." >&2
# echo "Use -h to display script details." >&2
# _usage 1
set +u
# Show config message
-[[ -f "${script_path}"/config ]] && echo "The settings have been overwritten by the "${script_path}"/config."
+[[ -f "${script_path}"/config ]] && echo "[Info] The settings have been overwritten by the "${script_path}"/config."
# Parse options
}
if [[ $(check_channel "${channel_name}") = false ]]; then
- echo "Invalid channel "${channel_name}"" >&2
- _usage 1
+ echo "[Error] Invalid channel "${channel_name}"" >&2
+ exit 1
fi
if [[ -d "${script_path}"/channels/${channel_name}.add ]] && [[ ! -d "${script_path}"/channels/${channel_name} ]]; then
if [[ $(( OPTIND - 1 )) = 1 ]] && [[ ${debug} = true ]]; then
rebuild=true
else
- echo "Options cannot be specified for the rebuild channel.All options will use the previous settings."
+ echo "[Error] Options cannot be specified for the rebuild channel.All options will use the previous settings." >&2
exit 1
fi
else
rebuild=true
fi
else
- echo "The previous build information is not in the working directory."
+ echo "[Error] The previous build information is not in the working directory." >&2
exit 1
fi
fi