update-message 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Uruk Update Manager
  5. #
  6. # Copyright 2022 hayder majid <hayder@riseup.net>
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  21. # MA 02110-1301, USA.
  22. MESS1=$(echo -e "Your System is up to date!"; echo)
  23. TITL=$(echo -e "System Updating Info"; echo);
  24. OKL=$(echo -e "Ok"; echo);
  25. NUMUPGRADE=$(< /usr/share/urukUpdater/status/upd.list wc -l)
  26. err=$(< /usr/share/urukUpdater/status/err wc -l)
  27. sudo /usr/lib/urukUpdater/checker
  28. sudo /usr/lib/urukUpdater/setter
  29. grep -q "Err:" /usr/share/urukUpdater/status/err || grep -q "E:" /usr/share/urukUpdater/status/err || grep -q "Err:" /usr/share/urukUpdater/status/result
  30. if [ $? = 0 ] || [ "$err" != 0 ] ; then
  31. zenity --error --text="$ERR " --width=200 --height=130 enity --error --text="$ERR " --width=200 --height=130 --window-icon=/usr/share/pixmaps/urukupdater.svg;
  32. elif [ "$NUMUPGRADE" -eq 0 ] || [ "$err" -eq 0 ] ; then
  33. sudo /usr/lib/urukUpdater/restart
  34. zenity --info --title="$TITL" --text="$MESS1" --ok-label="$OKL" --width=200 --height=100 enity --error --text="$ERR " --width=200 --height=130 --window-icon=/usr/share/pixmaps/urukupdater.svg;
  35. fi
  36. exit 0