Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/check-system
blob: 1bfb3e618e99136786e790e31e99ddde8bac23d8 (plain)
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
#!/usr/bin/python -u

import argparse
import os

import common

from devbot import system

common.setup()

parser = argparse.ArgumentParser(description='Check the system')
parser.add_argument("--update", action="store_true",
                    help="first of all update the system")
parser.add_argument("--remove", action="store_true",
                    help="remove all the unnecessary packages")
parser.add_argument("--test", action="store_true",
                    help="don't add or remove packages, test only")
parser.add_argument("--skip-if-unchanged", action="store_true",
                    help="skip if unchanged from the last check")
args = parser.parse_args()

interactive = "SUGAR_BUILDBOT" not in os.environ

system.check(update=args.update,
             remove=args.remove,
             test=args.test,
             interactive=interactive,
             skip_if_unchanged=args.skip_if_unchanged)