Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- _check_directory() {
- if [[ -d build ]]; then
- echo "O diretório /build já existe"
- else
- echo "Diretório /build criado!"
- mkdir build
- fi
- }
- _check_git() {
- local url="https://github.com/brektrou/rtl8821CU.git"
- if wget -q --spider "$url"; then
- return 0
- else
- return 1
- fi
- }
- _make_compile() {
- _check_directory
- cd build || exit 1
- if _check_git; then
- git clone "https://github.com/brektrou/rtl8821CU.git"
- cd rtl8821CU/ || exit 1
- make && sudo make install
- else
- echo "Falha na operação."
- exit 1
- fi
- }
- _check_driver() {
- if ls /lib/modules/"$(uname -r)"/kernel/drivers/net/wireless/realtek/rtl8821cu &> /dev/null; then
- echo "Instalado com sucesso!"
- else
- echo "Não instalado!"
- fi
- }
- _make_compile
- _check_driver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement