dotool/install.sh

14 lines
496 B
Bash
Raw Permalink Normal View History

2022-10-20 15:21:20 +02:00
#!/bin/sh
# ./install.sh [DESTDIR] [BINDIR]
2023-02-06 12:40:01 +01:00
: "${DOTOOL_VERSION=$(git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 1.2)}"
go build -ldflags "-X main.Version=$DOTOOL_VERSION" || exit
mkdir -p "$1/${2:-usr/local/bin}" || exit
cp -v dotool "$1/${2:-usr/local/bin}" || exit
mkdir -p "$1/etc/udev/rules.d" || exit
cp -v 80-dotool.rules "$1/etc/udev/rules.d" || exit
./_install.sh "$1" "$2" || exit
# Make the new/updated udev rule effective
udevadm control --reload
2022-10-24 11:29:35 +02:00
udevadm trigger