Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/geraldohomero/my-update

Update and upgrade scripts for daily use
https://github.com/geraldohomero/my-update

linux shell-script ubuntu update vitrinedev

Last synced: about 8 hours ago
JSON representation

Update and upgrade scripts for daily use

Awesome Lists containing this project

README

        

# My daily update shellscript for Pop!_OS

```bash
#!/usr/bin/env bash
RED='\e[1;91m'
GREEN='\e[1;92m'
NO_COLOR='\e[0m'
#----#

# Internet?

if ! ping -c 1 8.8.8.8 -q &> /dev/null; then
echo -e "${RED}[ERROR] - No internet connection.${NO_COLOR}"
exit 1
else
echo -e "${GREEN}[INFO] - Internet connection verified.${NO_COLOR}"
fi

upgrade_cleaning () {
echo -e "${GREEN}[INFO] - Upgrading and cleaning...${NO_COLOR}"
sleep 1
sudo apt autoclean
sudo apt clean
sudo apt update -m
sudo dpkg --configure -a
sudo apt install -f
sudo apt full-upgrade
sudo apt autoremove -y
#upgrades, repair and remove unused flatpaks
#flatpak repair --user
#flatpak remove --unused
flatpak update
}
#----# Execução do script
upgrade_cleaning

```
### Run:

`./update.sh`
***

Create alias for the `./update`

>`nano ~/.bash_aliases` - You need to have `.bash_aliases` on your `home` directory or just copy and paste the following to your .bashrc

>`alias update='./update.sh'`