update spelling, cloo.gl, scr, new mailserver etc etc
[dotfiles.git] / shell / .local / bin / update
1 #!/bin/sh
2 DV=/etc/debian_version
3
4 cmd() {
5 if [ -f $DV ]
6 then
7 echo -n 'apt-get update && apt-get dist-upgrade -y '
8 [ `head -c 1 $DV` -ge 9 ] && echo -n '--' || -n '&& apt-get '
9 echo -n 'autoremove --purge && apt-get clean && apt-get autoclean'
10 else
11 echo -n 'pacman -Syu && pacman -R `pacman -Qdtq`'
12 fi
13 }
14
15 sudo sh -c "$(cmd)"
16 sh -c 'offlineimap -u ttyui && vdirsyncer sync && khal && khard'