-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_pokeyslib.sh
More file actions
executable file
·31 lines (27 loc) · 1.05 KB
/
install_pokeyslib.sh
File metadata and controls
executable file
·31 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Überprüfen, ob die Abhängigkeiten installiert sind
if ! dpkg -s libusb-1.0-0 libusb-1.0-0-dev >/dev/null 2>&1; then
echo "Installing dependencies..."
sudo apt-get update
sudo apt-get install -y git build-essential libusb-1.0-0 libusb-1.0-0-dev
else
echo "Dependencies are already installed."
fi
# Überprüfen, ob das Repository geklont wurde
if [ ! -d "external/pokeyslib" ]; then
echo "Cloning PoKeysLib repository..."
git clone https://bitbucket.org/mbosnak/pokeyslib.git external/pokeyslib
else
echo "PoKeysLib repository already cloned."
fi
# Initialize the submodule for pokeyslib only (not recursive to avoid other submodules)
echo "Initializing the pokeyslib submodule..."
git submodule update --init external/pokeyslib
# Überprüfen, ob der Treiber bereits kompiliert ist
cd external/pokeyslib || exit 1
if [ ! -f "pokeyslib/libpokeyslib.so" ]; then
echo "Compiling and installing the PoKeys driver..."
sudo make -f Makefile.noqmake install
else
echo "PoKeys driver already compiled and installed."
fi