prvicons_update.py 498 B

123456789101112131415161718
  1. #!/usr/bin/env python3
  2. # This script updates icons from the SVG file
  3. import os
  4. import sys
  5. BASEDIR = os.path.abspath(os.path.dirname(__file__)) + os.sep
  6. inkscape_path = 'inkscape'
  7. if sys.platform == 'darwin':
  8. inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script'
  9. if os.path.exists(inkscape_app_path):
  10. inkscape_path = inkscape_app_path
  11. cmd = inkscape_path + ' "%sprvicons.svg" --without-gui --export-png="%sprvicons.png"' % (BASEDIR, BASEDIR)
  12. os.system(cmd)