File: buildd-update-chroots

package info (click to toggle)
sbuild 0.72.0-2~bpo8%2B2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 1,644 kB
  • sloc: perl: 14,730; sh: 1,455; sql: 797; lisp: 304; makefile: 295
file content (42 lines) | stat: -rwxr-xr-x 1,314 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#
# Copyright © 2005 Ryan Murray <rmurray@debian.org>
# Copyright © 2009 Thibaut VARÈNE <varenet@debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see
# <http://www.gnu.org/licenses/>.
#
#######################################################################

cleanup() {
        rm -f ~/NO-DAEMON-PLEASE
}

touch ~/NO-DAEMON-PLEASE
trap cleanup 0

touch ~/EXIT-DAEMON-PLEASE
echo -n Waiting for sbuild and buildd to exit...
while [ -f ~/EXIT-DAEMON-PLEASE ]; do
        sleep 10
done
echo .

schroot -a -u root -d /root -- apt-get update
echo Upgrading chroots:
schroot -a -u root -d /root -- apt-get dist-upgrade -y
echo Cleaning chroots:
schroot -a -u root -d /root -- apt-get autoremove -y
schroot -a -u root -d /root -- debfoster -f