Add dedicated alias file for each OS/Variant
Add a single 'upgrade' command which will do a full OS upgrade without any prompts.
This commit is contained in:
parent
bcfd4c1a45
commit
5ee86b0366
|
@ -17,8 +17,6 @@ alias fuck='sudo "$BASH" -c "$(history -p !!)"'
|
||||||
alias diff="diff --side-by-side --left-column -W \$COLUMNS"
|
alias diff="diff --side-by-side --left-column -W \$COLUMNS"
|
||||||
|
|
||||||
# OS functions (TODO: should be broken out and pulled in based on OS)
|
# OS functions (TODO: should be broken out and pulled in based on OS)
|
||||||
alias apt-all="sudo apt-get update; sudo apt-get full-upgrade -y; sudo apt-get autoremove -y; sudo apt-get clean -y;"
|
|
||||||
alias rpm-all="rpm-ostree upgrade"
|
|
||||||
alias pip-upgrade="pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U"
|
alias pip-upgrade="pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U"
|
||||||
|
|
||||||
# Legacy mappings
|
# Legacy mappings
|
||||||
|
@ -59,3 +57,17 @@ if [ "$(isdistrobox)" ]; then
|
||||||
else
|
else
|
||||||
source "$HOME/.dotfiles/bash/bash_aliases.host"
|
source "$HOME/.dotfiles/bash/bash_aliases.host"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/os-release ]; then
|
||||||
|
export OS=`grep -P '^ID=' /etc/os-release | cut -d'=' -f2 | sed 's/"//g'`
|
||||||
|
if [ -f ${HOME}/.dotfiles/bash/bash_aliases.$OS ]; then
|
||||||
|
source ${HOME}/.dotfiles/bash/bash_aliases.$OS
|
||||||
|
fi
|
||||||
|
OSVARIANT=`grep -P '^VARIANT_ID=' /etc/os-release | cut -d'=' -f2 | sed 's/"//g'`
|
||||||
|
if [ -z $OSVARIANT ]; then
|
||||||
|
export OSVARIANT
|
||||||
|
fi
|
||||||
|
if [ -f ${HOME}/.dotfiles/bash/bash_aliases.$OS-$OSVARIANT ]; then
|
||||||
|
source ${HOME}/.dotfiles/bash/bash_aliases.$OS-$OSVARIANT
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
alias upgrade="sudo pacman -Syyu --noconfirm"
|
|
@ -0,0 +1 @@
|
||||||
|
alias upgrade="sudo apt-get update; sudo apt-get full-upgrade -y; sudo apt-get autoremove -y; sudo apt-get clean -y;"
|
|
@ -0,0 +1 @@
|
||||||
|
alias upgrade="sudo dnf upgrade -y"
|
|
@ -0,0 +1 @@
|
||||||
|
alias upgrade="sudo rpm-ostree upgrade"
|
|
@ -0,0 +1 @@
|
||||||
|
alias upgrade="sudo apt-get update; sudo apt-get full-upgrade -y; sudo apt-get autoremove -y; sudo apt-get clean -y;"
|
Loading…
Reference in New Issue