gst-plugins-base: update translations
[platform/upstream/gstreamer.git] / scripts / check-clean-repos.py
1 #!/usr/bin/env python3
2
3 import os
4 import subprocess
5 import sys
6 from common import git
7
8
9 SCRIPTDIR = os.path.realpath(os.path.dirname(__file__))
10
11
12 if __name__ == "__main__":
13     subprojects_dir = os.path.join(SCRIPTDIR, "..", "subprojects")
14     exitcode = 0
15     for repo_name in os.listdir(subprojects_dir):
16         repo_dir = os.path.normpath(os.path.join(SCRIPTDIR, subprojects_dir, repo_name))
17         if not os.path.exists(os.path.join(repo_dir, '.git')):
18             continue
19
20         diff = git('diff', repository_path=repo_dir).strip('\n')
21         if diff:
22             print('ERROR: Repository %s is not clean' % repo_dir)
23             print('NOTE: Make sure to commit necessary changes in the gst_plugins_cache.json files')
24             print(diff)
25             exitcode += 1
26
27     sys.exit(exitcode)