From 8da16f9de65c7738d97b51780b6b149fb8cba418 Mon Sep 17 00:00:00 2001 From: mollusk Date: Sun, 8 Nov 2020 21:45:59 -0700 Subject: [PATCH] New Script: 88x2bu.sh: compile other wireless driver --- 88x2bu.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 88x2bu.sh diff --git a/88x2bu.sh b/88x2bu.sh new file mode 100755 index 0000000..313f7ca --- /dev/null +++ b/88x2bu.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +GITHUB_REPO="https://github.com/RinCat/RTL88x2BU-Linux-Driver.git" +TEMPDIR="/tmp" + + +dependencies_(){ + if [ -f /usr/bin/dnf ];then + dnf install make kernel-devel git + fi +} + + +clone_(){ + if [ ! -d "${TEMPDIR}"/88xbu ];then + git clone "${GITHUB_REPO}" "${TEMPDIR}"/88xbu + fi +} + +build_(){ + if [ -d "${TEMPDIR}"/88xbu ];then + cd "${TEMPDIR}"/88xbu + make clean + make "${1}" + make install + else + echo "${TEMPDIR}/88xbu does not exist" + exit 1 + fi + + +} + +dependencies_ +clone_ +build_ "${1}" \ No newline at end of file