apt-plus/update

29 lines
655 B
Bash

#!/bin/sh
success_f(){
echo "\033[38;5;78mSUCCESS\033[31;0m";
}
abort_f(){
echo "\033[38;5;161mABORTING\033[31;0m";
exit;
}
# Update sources list
echo "\033[38;5;208m[1/4] UPDATING THE LIST OF PACKAGES\033[31;0m";
sudo apt-get update && success_f || abort_f;
# Upgrade found packages
echo "\033[38;5;208m[2/4] UPGRADING PACKAGES\033[31;0m";
sudo apt-get upgrade && success_f || abort_f;
# Upgrade kernel
echo "\033[38;5;208m[3/4] UPGRADING KERNEL\033[31;0m";
sudo apt-get dist-upgrade && success_f || abort_f;
# Remove unused dependencies
echo "\033[38;5;208m[4/4] CLEANING\033[31;0m";
sudo apt-get autoremove;
sudo apt-get autoclean;
success_f;