mirror of
https://github.com/spiritLHLS/one-click-installation-script.git
synced 2024-11-16 21:43:37 +08:00
Update package.sh
This commit is contained in:
parent
ea6758ebd9
commit
4c7215bbe8
13
package.sh
13
package.sh
|
@ -283,16 +283,15 @@ check_eol_and_switch_apt_source() {
|
|||
|
||||
fix_broken() {
|
||||
# Check if the output of the update contains "--fix-broken install"
|
||||
if apt update | grep -F '--fix-broken install'; then
|
||||
if apt update | grep -E '--fix-broken.*install'; then
|
||||
# If it does, run apt --fix-broken install -y
|
||||
apt --fix-broken install -y
|
||||
apt update
|
||||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
# Print a message indicating that the update was successful
|
||||
green "The apt update was successful."
|
||||
exit 0
|
||||
if [ $? -eq 0 ]; then
|
||||
# Print a message indicating that the update was successful
|
||||
green "The apt update was successful."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user