Created
November 6, 2024 21:39
-
-
Save ccharlton/e84c82f60a568163a4b5cb30f6cd514e to your computer and use it in GitHub Desktop.
Maintenance shell script for local workstation updates
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/zsh | |
# Charlton's workstation maintenance script | |
# This script is a simple shell script that updates the shell and various libraries. | |
# It’s a good idea to run this script every week or so to keep a workstation up to date. | |
# The script can be saved in the `~/bin` directory as executable. | |
# $ chmod +x ~/bin/maintenance.sh | |
# To run the script, use the following command: | |
# $ ~/bin/maintenance.sh | |
# Start | |
echo "Maintenance script starting" | |
echo "\n\n" | |
echo "1️⃣ Updating shell..." | |
# Shell | |
time zsh -ic "omz update" | |
echo "\n\n" | |
echo "2️⃣ Updating Homebrew and recipes..." | |
# Libraries | |
time brew update && brew upgrade && brew cleanup | |
echo "\n\n" | |
echo "3️⃣ Updating GCP components..." | |
# Google Cloud Platform | |
time gcloud components update | |
# Done | |
echo "\n\n" | |
echo "✅ Maintenance complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment