2022-10-20 15:21:20 +02:00
|
|
|
#!/bin/sh
|
2023-01-05 00:42:06 +01:00
|
|
|
# ./install.sh [DESTDIR] [BINDIR]
|
2023-06-01 17:34:54 +02:00
|
|
|
: "${DOTOOL_VERSION=$(git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 1.3)}"
|
2023-04-19 14:23:05 +02:00
|
|
|
|
2023-01-10 11:41:45 +01:00
|
|
|
go build -ldflags "-X main.Version=$DOTOOL_VERSION" || exit
|
2023-01-05 00:42:06 +01:00
|
|
|
mkdir -p "$1/${2:-usr/local/bin}" || exit
|
2023-04-19 14:23:05 +02:00
|
|
|
cp -v dotool dotoolc dotoold "$1/${2:-usr/local/bin}" || exit
|
2023-01-05 00:42:06 +01:00
|
|
|
mkdir -p "$1/etc/udev/rules.d" || exit
|
|
|
|
cp -v 80-dotool.rules "$1/etc/udev/rules.d" || exit
|
2023-04-19 14:23:05 +02:00
|
|
|
|
|
|
|
# Remove files from before the keyboard layout approach changed
|
|
|
|
rm -f "$1/usr/share/X11/xorg.conf.d/50-dotool.conf"
|
|
|
|
rm -f "$1/etc/sway/config.d/dotool"
|
2023-01-31 13:26:10 +01:00
|
|
|
|
|
|
|
# Make the new/updated udev rule effective
|
|
|
|
udevadm control --reload
|
2022-10-24 11:29:35 +02:00
|
|
|
udevadm trigger
|