fix install script
authorIan Kelling <iank@fsf.org>
Fri, 12 Apr 2019 23:46:20 +0000 (19:46 -0400)
committerIan Kelling <iank@fsf.org>
Fri, 12 Apr 2019 23:46:20 +0000 (19:46 -0400)
hidusb-relay-cmd-setup

index 275832da954353cf1441f09532f4c40cc3e8e812..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 relay-cmd 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: