diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-11-03 04:46:15 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-11-24 20:59:06 +0100 |
commit | 2ba2be900664415dc5a34cc2cfdb82ecab3c4ce5 (patch) | |
tree | 45e54950eb3e94eb83318aceaf75b99c40cf2bf9 /gen_funcs.sh | |
parent | gen_determineargs.sh: determine_real_args(): Expand $TMPDIR (diff) | |
download | genkernel-2ba2be900664415dc5a34cc2cfdb82ecab3c4ce5.tar.gz genkernel-2ba2be900664415dc5a34cc2cfdb82ecab3c4ce5.tar.bz2 genkernel-2ba2be900664415dc5a34cc2cfdb82ecab3c4ce5.zip |
Add support for a custom font at boot
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-x | gen_funcs.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh index b47f698..107f02b 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -251,6 +251,28 @@ is_gzipped() { echo "${file_is_gzipped}" } +is_psf_file() { + [[ ${#} -ne 1 ]] \ + && gen_die "$(get_useful_function_stack "${FUNCNAME}")Invalid usage of ${FUNCNAME}(): Function takes exactly one argument (${#} given)!" + + local file_to_check=${1} + + if [ ! -f "${file_to_check}" ] + then + gen_die "$(get_useful_function_stack "${FUNCNAME}")Invalid usage of ${FUNCNAME}(): File '${file_to_check}' does not exist!" + fi + + local file_is_psf=no + local file_brief=$(file --brief "${file_to_check}" 2>/dev/null) + + if [[ "${file_brief}" == *"PC Screen Font"* ]] + then + file_is_psf=yes + fi + + echo "${file_is_psf}" +} + is_valid_ssh_host_keys_parameter_value() { local parameter_value=${1} |