Skip to content

Instantly share code, notes, and snippets.

@jrossmanjr
Last active May 13, 2020 18:27
Show Gist options
  • Save jrossmanjr/60ac964d44f4b589458e222f11e1c7cf to your computer and use it in GitHub Desktop.
Save jrossmanjr/60ac964d44f4b589458e222f11e1c7cf to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ $EUID -eq 0 ]];then
echo "::: You are root."
else
echo "::: sudo will be used."
# Check if it is actually installed
# If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then
export SUDO="sudo"
else
echo "::: Please install sudo or run this script as root."
exit 1
fi
fi
$SUDO apt update
$SUDO apt upgrade -y
$SUDO wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
$SUDO chmod +x /usr/bin/install-wifi
$SUDO install-wifi
echo ":-:-: DONE! :-:-:"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment