#!/bin/bash

# Sind Updates verfuegbar?
u=$(apt-show-versions -u | wc -l)
if [ $u -eq 0 ]; then
  # Keine Updates verfuegbar
  exit 0
fi

xlinux-run-on-desktop 'zenity --question --title="Softwareupdate" --text="Es sind Updates verfügbar.\n\nWährend der Installation können Sie normal weiterarbeiten.\n\nSollen die Updates jetzt installiert werden?" --cancel-label="später" --ellipsize'
r=$?
if [ $r -ne 0 ]; then
  # Update abgebrochen
  exit 0
fi

xlinux-update --search --install --force --allyes
  