1#!/usr/local/bin/python3.8 2 3import os 4import subprocess 5import sys 6 7destdir = os.environ.get('DESTDIR', '') 8datadir = sys.argv[1] 9pkgdatadir = sys.argv[2] 10bindir = os.path.join(destdir + os.sep + sys.argv[3]) 11app_id = sys.argv[4] 12 13if not os.path.exists(bindir): 14 os.makedirs(bindir) 15 16src = os.path.join(pkgdatadir, app_id) 17dest = os.path.join(bindir, 'gnome-weather') 18subprocess.call(['ln', '-s', '-f', src, dest]) 19 20if not destdir: 21 print('Updating icon cache...') 22 subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons', 'hicolor')]) 23 print("Installing new Schemas") 24 subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0/schemas')]) 25 26