mirror of
https://github.com/cilynx/rtl88x2bu
synced 2025-08-30 22:05:40 +00:00
This reverts commit f2bccb96ac
.
The option `--cvs-exclued` not only excluds CVS folders, but also
"core". The reason is given in
https://stackoverflow.com/a/9978573/8831116 . In a nutshell, CVS ignores
the folder "core" because it may contain core dumps.
Since we have a crucial folder "core", not syncing it breaks the DKMS
deployment, as reported in
https://github.com/cilynx/rtl88x2bu/issues/172.
Thus, the old behaviour has to be restored.
38 lines
731 B
Bash
Executable File
38 lines
731 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
function ensure_no_cli_args() {
|
|
if [ $# -ne 0 ]
|
|
then
|
|
echo "No command line arguments accepted!" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
function ensure_root_permissions() {
|
|
if ! sudo -v
|
|
then
|
|
echo "Root permissions required to deploy the driver!" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
function get_version() {
|
|
sed -En 's/PACKAGE_VERSION="(.*)"/\1/p' dkms.conf
|
|
}
|
|
|
|
function deploy_driver() {
|
|
VER=$(get_version)
|
|
sudo rsync --delete --exclude=.git -rvhP ./ "/usr/src/rtl88x2bu-${VER}"
|
|
for action in add build install
|
|
do
|
|
sudo dkms "${action}" -m rtl88x2bu -v "${VER}"
|
|
done
|
|
sudo modprobe 88x2bu
|
|
}
|
|
|
|
ensure_no_cli_args "$@"
|
|
ensure_root_permissions
|
|
deploy_driver
|