From 0462da8b5dec5df146f40a24f3f7d16a41377f7a Mon Sep 17 00:00:00 2001 From: Surferlul Date: Thu, 21 Jul 2022 21:09:12 +0200 Subject: [PATCH] added setup --- .gitignore | 3 +++ setup | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 setup diff --git a/.gitignore b/.gitignore index 0e75bdf..c6dd64b 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,6 @@ dmypy.json # Pyre type checker .pyre/ + +/guest +/host diff --git a/setup b/setup new file mode 100755 index 0000000..55ff80a --- /dev/null +++ b/setup @@ -0,0 +1,18 @@ +#!/bin/sh + +PYTHON="$(whatis -w 'python3.1*' | cut -d " " -f1)" +PIP="$PYTHON -m pip" +$PIP install remote-evdev +if [ -z ${var+x} ]; then + cp vm_guest_example.sh guest + cp vm_host_example.sh host + $PYTHON ./test-evdev.py +else if [[ "$1" == "guest" ]]; then + cp vm_guest_example.sh guest + $PYTHON ./test-evdev.py guest +else if [[ "$1" == "host" ]]; then + cp vm_host_example.sh host + $PYTHON ./test-evdev.py host +else + echo "unknown argument $1" +fi; fi; fi