fix(install): pkcon available on dnf as well: hack to fix "up"

- Add more steps to post-install
This commit is contained in:
Pratik Tripathy
2024-09-18 19:42:56 +05:30
parent d027d8c1e5
commit d2c521cca4
4 changed files with 9 additions and 3 deletions

View File

@@ -15,12 +15,12 @@ up(){
update_command=""
# Detect package manager and set package manager commands
if command -v pkcon > /dev/null; then
if command -v dnf > /dev/null 2>&1; then
update_command="sudo dnf upgrade --refresh && sudo dnf system-upgrade download --releasever=$(rpm -E %fedora) && sudo dnf autoremove"
elif command -v pkcon > /dev/null 2>&1; then
update_command="sudo pkcon refresh && sudo pkcon update && sudo apt dist-upgrade && sudo apt autoremove"
elif command -v apt-get > /dev/null 2>&1; then
update_command="sudo apt-get update && sudo apt-get upgrade && sudo apt dist-upgrade && sudo apt autoremove"
elif command -v dnf > /dev/null 2>&1; then
update_command="sudo dnf upgrade --refresh && sudo dnf system-upgrade download --releasever=$(rpm -E %fedora) && sudo dnf autoremove"
fi
eval "$update_command"