Improve stability

This commit is contained in:
Muhammad Rivan 2021-06-11 20:48:43 +07:00
parent 5cbcb74b20
commit 3912767cd0
No known key found for this signature in database
GPG key ID: C56A200FD936FAAA
3 changed files with 19 additions and 6 deletions

View file

@ -121,7 +121,7 @@ else
if [[ "${interactive}" == 'true' ]]; then
show_panel_opacity_dialog; show_sidebar_size_dialog; show_nautilus_style_dialog
prompt -w "DIALOG: '--size' and '--panel' parameters are ignored if exist."; echo
echo; prompt -w "DIALOG: '--size' and '--panel' parameters are ignored if exist."; echo
else
show_needed_dialogs
fi

View file

@ -137,6 +137,7 @@ swupd_packages=""
swupd_url="https://cdn.download.clearlinux.org/current/x86_64/os/Packages/"
swupd_ver_url="https://cdn.download.clearlinux.org/latest"
swupd_prepared="false"
apt_prepared="false"
xbps_prepared="false"
#------------Decoration-----------#

View file

@ -62,8 +62,8 @@ prepare_deps() {
if (( remote_time_int > local_time_int )); then
prompt -w "\n DEPS: Your system clock is wrong"
prompt -i "DEPS: Updating your system clock and try again...\n"
sudo date -s "${remote_time}"; sudo hwclock --systohc
prompt -i "DEPS: Updating your system clock...\n"
sudo date -s "${remote_time}" &> /dev/null; sudo hwclock --systohc
fi
}
@ -111,6 +111,18 @@ install_swupd_packages() {
done
}
prepare_apt() {
[[ "${apt_prepared}" == "true" ]] && return 0
if ! sudo apt update; then
prompt -w "\n APT: Your repo lists are broken"
prompt -i "APT: Full-cleaning your repo lists and try again...\n"
sudo apt clean; sudo rm -rf /var/lib/apt/lists; sudo apt update
fi
apt_prepared="true"
}
prepare_xbps() {
[[ "${xbps_prepared}" == "true" ]] && return 0
@ -138,7 +150,7 @@ install_theme_deps() {
# Rolling release
prepare_swupd && sudo swupd bundle-add libglib libxml2 && install_swupd_packages sassc libsass
elif has_command apt; then
sudo apt update && sudo apt install -y sassc libglib2.0-dev-bin gtk2-engines-murrine libxml2-utils
prepare_apt && sudo apt install -y sassc libglib2.0-dev-bin gtk2-engines-murrine libxml2-utils
elif has_command dnf; then
sudo dnf install -y sassc glib2-devel gtk-murrine-engine libxml2
elif has_command yum; then
@ -170,7 +182,7 @@ install_beggy_deps() {
# Rolling release
prepare_swupd && sudo swupd bundle-add ImageMagick
elif has_command apt; then
sudo apt update && sudo apt install -y imagemagick
prepare_apt && sudo apt install -y imagemagick
elif has_command dnf; then
sudo dnf install -y ImageMagick
elif has_command yum; then
@ -198,7 +210,7 @@ install_dialog_deps() {
# Rolling release
prepare_swupd && install_swupd_packages dialog
elif has_command apt; then
sudo apt update && sudo apt install -y dialog
prepare_apt && sudo apt install -y dialog
elif has_command dnf; then
sudo dnf install -y dialog
elif has_command yum; then