rtlwifi-setup: encapulate vars

This commit is contained in:
mollusk 2021-10-17 10:53:09 -07:00
parent ff60ec22e5
commit d1474f7522

View File

@ -19,24 +19,24 @@ _fetch_deps(){
_download(){ _download(){
if [ ! -d ${tmpdir}/${pkgname} ];then if [ ! -d "${tmpdir}"/"${pkgname}" ];then
git clone ${pkgurl} ${tmpdir}/${pkgname} git clone "${pkgurl}" "${tmpdir}"/"${pkgname}"
fi fi
} }
_apply_patch(){ _apply_patch(){
wget https://github.com/cilynx/rtl88x2bu/pull/58.patch wget "https://github.com/cilynx/rtl88x2bu/pull/58.patch"
git apply 58.patch git apply 58.patch
} }
_install(){ _install(){
cd ${tmpdir}/${pkgname} cd "${tmpdir}"/"${pkgname}"
_apply_patch _apply_patch
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf) VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
rsync -rvhP ./ /usr/src/rtl88x2bu-${VER} rsync -rvhP ./ /usr/src/rtl88x2bu-"${VER}"
dkms add -m rtl88x2bu -v ${VER} dkms add -m rtl88x2bu -v "${VER}"
dkms build -m rtl88x2bu -v ${VER} dkms build -m rtl88x2bu -v "${VER}"
dkms install -m rtl88x2bu -v ${VER} dkms install -m rtl88x2bu -v "${VER}"
modprobe 88x2bu modprobe 88x2bu
} }