-
-
Save mbifulco/3b224599b3f41409952f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------------------------------------ | |
# Title: piupdate.sh | |
# Author: Andrew Miller (updated by Mike Bifulco) | |
# Version: 0.1.2 | |
# | |
# Description: | |
# A really simple script that runs through all of the usual updates | |
# for a Raspbian Raspberry Pi. | |
# | |
# Note: Use the -f flag to check and update the firmware | |
# (Requires https://github.com/Hexxeh/rpi-update) | |
# ------------------------------------------------------------------ | |
date | |
echo "$(tput setaf 1)Checking for rpi-update install...$(tput sgr0)" | |
sudo apt-get install rpi-update | |
echo "$(tput setaf 1)Checking for system software updates...$(tput sgr0)" | |
sudo apt-get update | |
echo "$(tput setaf 1)Updating system software...$(tput sgr0)" | |
sudo apt-get upgrade | |
echo "$(tput setaf 1)Updating distribution software...$(tput sgr0)" | |
sudo apt-get dist-upgrade | |
echo "$(tput setaf 1)Cleaning up...$(tput sgr0)" | |
sudo apt-get autoremove --purge | |
if [ "$1" = "-f" ] | |
then | |
echo "$(tput setaf 1)Checking and updating firmware...$(tput sgr0)" | |
sudo rpi-update | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment