summaryrefslogtreecommitdiff
path: root/meson_post_install.py
blob: 5cc2dc49b5415fe25c65232517091c245a0495a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3

import os
import sys

destdir = os.environ.get('DESTDIR', '')
localstatedir = os.path.normpath(destdir + os.sep + sys.argv[1])

# FIXME: meson will not track the creation of these directories
#        https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
dst_dirs = [
  (os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'), 0o775),
  (os.path.join(localstatedir, 'lib', 'AccountsService', 'users'), 0o700),
]

for (dst_dir, dst_dir_mode) in dst_dirs:
  if not os.path.exists(dst_dir):
    os.makedirs(dst_dir, mode=dst_dir_mode)