#!/bin/sh
par_m=$1
url_address='https://f-d.pp.ua/arch/drivers/wireless/TL-WN822N'
case $par_m in
    *h*)
    echo "This script install wireless TP-Link TL-WN722N drivers"
    echo "Usage : curl $url_address/setup_TL-WN822N.sh | sh"
    exit
    ;;
esac
#https://f-d.pp.ua/arch/drivers/wireless/TL-WN822N/

current_location=$(pwd)
wget -c $url_address/TL-WN822N.tar


cp TL-WN822N.tar /TL-WN822N.tar
cd /
tar -xf TL-WN822N.tar && cd /home/drivers/wireless/TL-WN822N
make && make install
rm /TL-WN822N.tar && rm $current_location/TL-WN822N.tar
echo "Reboot your conputer"

