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