update for non optimal systems

This commit is contained in:
Tobias Schmidl 2018-02-03 09:56:57 +01:00
parent fc49b2d745
commit 7e916cf7e1
2 changed files with 12 additions and 11 deletions

View file

@ -10,15 +10,16 @@ alias xzc='xz --best --extreme'
alias extip='curl -LR1fs --compressed https://ipinfo.io/ | jq -Sc' alias extip='curl -LR1fs --compressed https://ipinfo.io/ | jq -Sc'
alias jjar='java -jar' alias jjar='java -jar'
current_dist=`lsb_release -c -s` if [ -x "$(lsb_release)" ];
all_dkms_packages="`apt-cache rdepends --installed dkms | sed -rn 's/^ +([^ ]+)$/\1/p' | sort -iu`"
if [ $use_sudo -eq 1 ];
then then
current_dist=`lsb_release -c -s`
all_dkms_packages="`apt-cache rdepends --installed dkms | sed -rn 's/^ +([^ ]+)$/\1/p' | sort -iu`"
if [ $use_sudo -eq 1 ];
then
alias adbu='sudo $apt_pref -t ${current_dist}-backports $apt_upgr' alias adbu='sudo $apt_pref -t ${current_dist}-backports $apt_upgr'
alias drd='[ -n "$all_dkms_packages" ] && sudo dpkg-reconfigure $all_dkms_packages' alias drd='[ -n "$all_dkms_packages" ] && sudo dpkg-reconfigure $all_dkms_packages'
else else
alias adbu='su -lc "$apt_pref -t ${current_dist}-backports $apt_upgr" root' alias adbu='su -lc "$apt_pref -t ${current_dist}-backports $apt_upgr" root'
alias drd='[ -n "$all_dkms_packages" ] && su -lc "dpkg-reconfigure $all_dkms_packages" root' alias drd='[ -n "$all_dkms_packages" ] && su -lc "dpkg-reconfigure $all_dkms_packages" root'
fi
fi fi

View file

@ -2,5 +2,5 @@
export MAILCHECK=1 export MAILCHECK=1
fortune debian house-harkonnen house-atreides | cowsay -f tux -W 76 -n which fortune >/dev/null && fortune debian house-harkonnen house-atreides | cowsay -f tux -W 76 -n
which todo > /dev/null && todo due which todo > /dev/null && todo due