#!/bin/bash build() { # subshell to avoid namespace pollution ( l=$LANG unset LANG for cfg in etc/rc.conf etc/vconsole.conf etc/locale.conf; do [[ -s $BASEDIR/$cfg ]] && . "$BASEDIR/$cfg" done [[ $LANG ]] && LOCALE=$LANG LANG=$l if [[ $KEYMAP ]]; then if [[ $LOCALE = *[Uu][Tt][Ff]?(-)8 ]]; then touch "$BUILDROOT/keymap.utf8" uc=-u fi loadkeys -q $uc $KEYMAP -b > "$BUILDROOT/keymap.bin" fi ) (( $? == 0 )) && SCRIPT=keymap } help() { cat <