mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
fix(install): pkcon available on dnf as well: hack to fix "up"
- Add more steps to post-install
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user