You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
829 B
24 lines
829 B
4 years ago
|
#!/usr/bin/env python3
|
||
|
import os
|
||
|
import pathlib
|
||
|
import subprocess
|
||
|
|
||
|
prefix = pathlib.Path(os.environ.get('MESON_INSTALL_PREFIX', '/usr/local'))
|
||
|
datadir = prefix / 'share'
|
||
|
bindir = prefix / 'bin'
|
||
|
destdir = os.environ.get('DESTDIR', '')
|
||
|
|
||
|
src = os.path.join(datadir, 'org.snapcast.control.gtk', 'org.snapcast.control.gtk')
|
||
|
dest = os.path.join(bindir, 'snapcontrol')
|
||
|
subprocess.call(['ln', '-s', '-f', src, dest])
|
||
|
|
||
|
if not destdir:
|
||
|
print('Compiling gsettings schemas...')
|
||
|
subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0/schemas')])
|
||
|
|
||
|
print('Updating icon cache...')
|
||
|
subprocess.call(['gtk-update-icon-cache', '-qtf', str(datadir / 'icons' / 'hicolor' / 'scalable')])
|
||
|
|
||
|
print('Updating desktop database...')
|
||
|
subprocess.call(['update-desktop-database', '-q', str(datadir / 'applications')])
|