mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 13:50:16 +01:00
And fix the script to sync the headers up so it syncs event codes for both bsd and linux, but only syncs input.h for linux. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
31 lines
754 B
Bash
Executable file
31 lines
754 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Syncs the repository with the input.h and input-event-codes.h headers from
|
|
# a checked out source directory.
|
|
#
|
|
# Usage:
|
|
# sync-with-kernel-headers.sh path/to/kernel v4.12
|
|
|
|
KERNEL_TREE="$1"
|
|
GIT_DIR="$KERNEL_TREE/.git"
|
|
TAG="$2"
|
|
|
|
export GIT_DIR
|
|
|
|
if [ -z "$TAG" ] || ! [ -d "$GIT_DIR" ]; then
|
|
echo "Usage: `basename $0` path/to/kernel tag"
|
|
exit 1
|
|
fi
|
|
if ! [ -d .git ]; then
|
|
echo "Run me from the top-level git tree"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
file="linux/input.h"
|
|
git cat-file -p "$TAG:include/uapi/$file" > "include/linux/linux/$(basename $file)"
|
|
|
|
file="linux/input-event-codes.h"
|
|
git cat-file -p "$TAG:include/uapi/$file" > "include/linux/linux/$(basename $file)"
|
|
git cat-file -p "$TAG:include/uapi/$file" > "include/linux/freebsd/$(basename $file)"
|
|
|