Skip to content

Commit

Permalink
etc: Port iptsd-find-hidraw to iptsd-foreach
Browse files Browse the repository at this point in the history
Also add a deprecation notice, since it can't handle multiple devices.
  • Loading branch information
StollD committed Apr 25, 2024
1 parent 26cf848 commit efd13d2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 47 deletions.
46 changes: 0 additions & 46 deletions etc/iptsd-find-hidraw

This file was deleted.

2 changes: 1 addition & 1 deletion etc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ install_subdir(
)

install_data(
'iptsd-find-hidraw',
'scripts/iptsd-find-hidraw',
install_dir: bindir,
install_mode: 'rwxr-xr-x',
)
Expand Down
15 changes: 15 additions & 0 deletions etc/scripts/iptsd-find-hidraw
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later

function run-iptsd-find-hidraw() {
local -r script_dir="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"

source "${script_dir}/iptsd-foreach"

spdlog warn "iptsd-find-hidraw is deprecated, please use iptsd-foreach"
run-iptsd-foreach -t touchscreen -i 0 -- echo {}
}

if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
run-iptsd-find-hidraw "$@"
fi

0 comments on commit efd13d2

Please sign in to comment.