Compare commits

..

No commits in common. "fe5ad9f4af0f8cbd7026bb49d9fc2dd574186dba" and "61317b5483ed8cbdb1ffd62207240b3ed41b84e3" have entirely different histories.

1 changed files with 7 additions and 20 deletions

View File

@ -162,13 +162,8 @@ update-system() {
return
fi
if [ -z "$password" ]; then
echo -e "\033[32;1m=== Starting system update, please enter your password ===\033[0m"
read -sep "Password: " password
fi
echo $password | sudo -Sp "" true > /dev/null 2>&1
echo -e "\033[32;1m=== Starting system update, please enter your password ===\033[0m"
sudo true
if [ $? -ne 0 ]; then
echo "Could not get sudo..."
return 1
@ -180,11 +175,11 @@ update-system() {
# Debian based systems
command -v apt > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo $password | sudo -Sp "" apt update -y
sudo apt update -y
if [ $? -eq 0 ]; then
echo $password | sudo -Sp "" apt upgrade -y
sudo apt upgrade -y
if [ $? -eq 0 ]; then
echo $password | sudo -Sp "" apt autoremove -y
sudo apt autoremove -y
fi
fi
fi
@ -196,19 +191,17 @@ update-system() {
yay -Syu --noconfirm
yay -Syua --noconfirm
else
command -v pacman > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo $password | sudo -Sp "" pacman -Syu --noconfirm
sudo pacman -Syu --noconfirm
fi
fi
# Fedora based systems
command -v dnf > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo $password | sudo -Sp "" dnf upgrade
sudo dnf upgrade
fi
local seconds=$((`date +%s` - $start))
@ -470,12 +463,6 @@ partial-update() {
main() {
if [ "$1" == "--pass" ]; then
shift
password=$1
shift
fi
if [ $# -eq 0 ]; then
_lock_or_error_message
local error_code=$?