diff --git a/lib-core.sh b/lib-core.sh index fd850ab..349c809 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -296,13 +296,13 @@ trap 'signal_abort' INT TERM TSTP ask() { echo -e "${c_magenta}\r" - read -p " ${2}" ${1} 2>&1 + read -p " ${2}: " ${1} 2>&1 echo -e "${c_default}" } confirm() { while [[ "${!1}" != "y" && "${!1}" != "n" ]]; do - ask ${1} "${2}" + ask ${1} "${2} (y/n)" done } diff --git a/lib-install.sh b/lib-install.sh index a8ce601..f1840e2 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -57,7 +57,7 @@ prepare_swupd() { 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\n" - confirm remove "CLEAR LINUX: You wanna remove it? (y/n): "; echo + confirm remove "CLEAR LINUX: You wanna remove it?"; echo fi if ! sudo swupd update -y; then @@ -94,12 +94,13 @@ install_swupd_packages() { prepare_xbps() { [[ "${xbps_prepared}" == "true" ]] && return 0 - # 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 + # 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; sudo xbps-install -Syu + xbps_prepared="true" }