diff --git a/aliases.zsh b/aliases.zsh index a912a7e..1c489a1 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -10,15 +10,16 @@ alias xzc='xz --best --extreme' alias extip='curl -LR1fs --compressed https://ipinfo.io/ | jq -Sc' alias jjar='java -jar' -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 ]; +if [ -x "$(lsb_release)" ]; then - alias adbu='sudo $apt_pref -t ${current_dist}-backports $apt_upgr' - alias drd='[ -n "$all_dkms_packages" ] && sudo dpkg-reconfigure $all_dkms_packages' -else - 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' + 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 drd='[ -n "$all_dkms_packages" ] && sudo dpkg-reconfigure $all_dkms_packages' + else + 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' + fi fi - diff --git a/zinit.zsh b/zinit.zsh index 23a1330..8c33769 100644 --- a/zinit.zsh +++ b/zinit.zsh @@ -2,5 +2,5 @@ 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