Change update to continuous mail sync
[dotfiles.git] / shell / .local / bin / update
index 3113604..2dedbc0 100755 (executable)
@@ -1,17 +1,10 @@
 #!/bin/sh
-DV=/etc/debian_version
 NUL='>/dev/null 2>&1'
 
 cmd() {
-       if [ -f $DV ]
-       then
-               echo -n 'apt-get update && apt-get dist-upgrade -y '
-               [ `head -c 1 $DV` -ge 9 ] && echo -n '--' || -n '&& apt-get '
-               echo -n 'autoremove --purge && apt-get clean && apt-get autoclean'
-       else
-               echo -n 'pacman -Syu && pacman -R `pacman -Qdtq`'
-       fi
+       echo -n 'apt-get update && apt-get dist-upgrade -y && '
+       echo -n 'apt-get autoremove --purge && apt-get clean && apt-get autoclean'
 }
 
-sudo sh -c "`cmd`"
-sh -c "tlmgr update --all --self && offlineimap -u ttyui && vdirsyncer sync && khal $NUL && khard $NUL"
+sudo sh -c "$(cmd)"
+sh -c "tlmgr update --all --self && offlineimap -o -u ttyui && vdirsyncer sync && khal -c .config/khal/config $NUL && khard $NUL && pass git pull origin master"