#!/bin/bash set -e INPUT_HEADER="/usr/include/linux/input.h" LOCAL_INPUT_HEADER="linux-input.h" OUTPUT_MAPH="linux-input-keycodes.h" SKIP="KEY_MIN_INTERESTING KEY_MAX KEY_CNT" if [ ! -e "$LOCAL_INPUT_HEADER" ]; then if [ ! -e "$INPUT_HEADER" ]; then echo "Can't find input header: $INPUT_HEADER" >&2 exit 1 fi cp "$INPUT_HEADER" "$LOCAL_INPUT_HEADER" fi cat > "$OUTPUT_MAPH" <> "$OUTPUT_MAPH" done cat >> "$OUTPUT_MAPH" << EOF { NULL, 0, false, NULL } EOF exit 0