-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·37 lines (27 loc) · 810 Bytes
/
install.sh
File metadata and controls
executable file
·37 lines (27 loc) · 810 Bytes
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
32
33
34
35
36
37
#!/bin/bash
# This script was partly inspired by https://github.com/atar-axis/xpadneo/blob/master/install.sh
# Source variables
source _variables.sh
set -e
if [[ "$EUID" != 0 ]]; then
echo "The script needs to be run as root."
exit 1
fi
echo "Starting installation of $MODULE_NAME module..."
# Build the module
echo "Building module..."
make clean && make
# Install the module
echo "Installing module..."
make install
# Update module dependencies
echo "Updating module dependencies..."
depmod -a
# Load the module
echo "Loading module..."
modprobe $MODULE_NAME
# Configure module auto-loading
echo "Configuring module auto-loading..."
echo "$MODULE_NAME" > "$MODULES_LOAD_DIR/$MODULE_NAME.conf"
echo "Installation completed successfully!"
echo "Module will be loaded automatically on next boot."