update-linux.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. #
  3. # Copyright 2014 wkhtmltopdf authors
  4. #
  5. # This file is part of wkhtmltopdf.
  6. #
  7. # wkhtmltopdf is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # wkhtmltopdf is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public License
  18. # along with wkhtmltopdf. If not, see <http:#www.gnu.org/licenses/>.
  19. if [ "$(id -u)" != "0" ]; then
  20. echo "This script must be run as root" 1>&2
  21. exit 1
  22. fi
  23. # update the host machine
  24. apt-get update
  25. apt-get dist-upgrade --assume-yes
  26. # update the wheezy chroots
  27. schroot -c wkhtmltopdf-wheezy-amd64 -- apt-get update
  28. schroot -c wkhtmltopdf-wheezy-amd64 -- apt-get dist-upgrade --assume-yes
  29. schroot -c wkhtmltopdf-wheezy-i386 -- apt-get update
  30. schroot -c wkhtmltopdf-wheezy-i386 -- apt-get dist-upgrade --assume-yes
  31. # update the centos 5 chroots
  32. schroot -c wkhtmltopdf-centos5-amd64 -- yum update -y
  33. schroot -c wkhtmltopdf-centos5-i386 -- yum update -y