On Tue, Sep 27, 2011 at 11:31:53AM +0200, Tom Gundersen wrote:
On Tue, Sep 27, 2011 at 3:22 AM, Dave Reisner <d@falconindy.com> wrote:
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- hooks/keymap | 11 +++-------- install/keymap | 8 +++----- 2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/hooks/keymap b/hooks/keymap index 3593168..14f20a1 100644 --- a/hooks/keymap +++ b/hooks/keymap @@ -3,14 +3,9 @@ run_hook () { if [ -e /keymap.bin ]; then msg -n ":: Loading keymap..." - . /keymap.utf8 - if [ "${UTF8}" = "yes" ]; then - kbd_mode -u -C /dev/console - printf "\033%%G" >> /dev/console - else - kbd_mode -a -C /dev/console - printf "\033%%@" >> /dev/console - fi + [ -f /keymap.utf8 ] && mode=-u || mode=-a + kbd_mode $mode -C /dev/console + printf "\033%%G" >> /dev/console
Why is this unconditional now? Should it not be %%@ in the non-unicode case? If not please explain in the commit message.
Not intentional -- too greedy on the refactor. Thanks for the catch. d
loadkmap < /keymap.bin msg "done." fi diff --git a/install/keymap b/install/keymap index 2cf4d15..2880f15 100644 --- a/install/keymap +++ b/install/keymap @@ -7,12 +7,10 @@ build() { . "$BASEDIR/etc/rc.conf" if [[ $KEYMAP ]]; then if [[ $LOCALE = *[Uu][Tt][Ff]-8 ]]; then - printf '%s\n' "UTF8=yes" > "$BUILDROOT/keymap.utf8" - /bin/loadkeys -q -u $KEYMAP -b > "$BUILDROOT/keymap.bin" - else - printf '%s\n' "UTF8=no" > "$BUILDROOT/keymap.utf8" - /bin/loadkeys -q $KEYMAP -b > "$BUILDROOT/keymap.bin" + touch "$BUILDROOT/keymap.utf8" + uc=-u fi + /bin/loadkeys -q $uc $KEYMAP -b > "$BUILDROOT/keymap.bin" fi )
-- 1.7.6.4