fix install script
[libremanage.git] / hidusb-relay-cmd-setup
index 73ac1fc85f6a659d535535552d248c73cab8a50c..86e84157475cf350f71cdc5961428ac817e22ce4 100755 (executable)
@@ -2,6 +2,7 @@
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
+script_dir="$(readlink -f -- "$BASH_SOURCE")"
 rm -rf usb-relay-hid
 git clone https://vcs.fsf.org/git/usb-relay-hid.git
 
@@ -19,7 +20,7 @@ cd commandline/makemake/
 apt update
 apt-get install libusb-dev libusb-1.0-0-dev
 make
-cp hidusb-relay-cmd /usr/local/bin
+cp $script_dir/libremanage hidusb-relay-cmd /usr/local/bin
 
 cat <<'EOF'
 the output should be similar to this: