diff --git a/lib-core.sh b/lib-core.sh index 2286a034..9bb0a3a2 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -21,7 +21,7 @@ WHITESUR_SOURCE=("lib-core.sh") #--------------System--------------# export WHITESUR_PID=$$ -export MY_USERNAME="$(logname 2> /dev/null || echo ${SUDO_USER:-${USER}})" +MY_USERNAME="$(logname 2> /dev/null || echo ${SUDO_USER:-${USER}})" if command -v gnome-shell &> /dev/null; then if (( $(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f 1) >= 4 )); then @@ -253,10 +253,10 @@ signal_error() { prompt -e "\n\n Oops! Operation failed...\n" prompt -e "=========== ERROR LOG ===========" - echo -e "${log}" - - if [[ ! "${log}" ]] ; then - prompt -e ">>>>>>> No error log found <<<<<<" + if [[ "${log}" ]] ; then + echo -e "${log}" + else + prompt -e "\n>>>>>>> No error log found <<<<<<" fi prompt -e "\n =========== ERROR INFO ==========" @@ -571,7 +571,7 @@ avoid_variant_duplicates() { themes=($(printf "%s\n" "${themes[@]}" | sort -u)) } -# 'finalize_argument_parsing' is in the 'systems' section +# 'finalize_argument_parsing' is in the 'MISC' section ############################################################################### # FILES # @@ -676,7 +676,5 @@ finalize_argument_parsing() { [[ "${has_any_error}" == "true" ]] && exit 1 || exit 0 elif [[ "${has_any_error}" == "true" ]]; then echo; prompt -i "Try '$0 --help' for more information."; exit 1 - elif [[ "${need_dialog[@]}" =~ "true" ]]; then - echo fi } diff --git a/lib-install.sh b/lib-install.sh index 300c852b..a36b9bb3 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -52,8 +52,8 @@ prepare_swupd() { local dist="" if has_command dnf; then - prompt -w "CLEAR LINUX: You have 'dnf' installed in your system. It may break your system especially when you remove a package" - confirm remove "CLEAR LINUX: You wanna remove it? (y/n): " + prompt -w "CLEAR LINUX: You have 'dnf' installed in your system. It may break your system especially when you remove a package\n" + confirm remove "CLEAR LINUX: You wanna remove it? (y/n): "; echo fi if ! sudo swupd update -y; then @@ -90,11 +90,11 @@ install_swupd_packages() { prepare_xbps() { [[ "${xbps_prepared}" == "true" ]] && return 0 - # 'xbps-install' requires 'xbps' to be always up-to-date - sudo xbps-install -Syu xbps # System upgrading can't remove the old kernel files by it self. It eats the # boot partition and may cause kernel panic when there is no enough space sudo vkpurge rm all + # 'xbps-install' requires 'xbps' to be always up-to-date + sudo xbps-install -Syu xbps xbps_prepared="true" } @@ -117,7 +117,9 @@ install_theme_deps() { sudo yum install -y sassc glib2-devel gtk-murrine-engine libxml2 elif has_command pacman; then # Rolling release - sudo pacman -Syu --noconfirm --needed sassc glib2 gtk-engine-murrine libxml2 + # 'Syu' (with a single y) may causes "could not open ... decompression failed" + # and "target not found ". We got to force 'pacman' to update the repos + sudo pacman -Syyu --noconfirm --needed sassc glib2 gtk-engine-murrine libxml2 elif has_command xbps-install; then # Rolling release # 'libxml2' is already included here, and it's gonna broke the installation