Commits

Gabriele Lanaro committed 9673998

added a script to install desktop files & co

  • Participants
  • Parent commits 4daae89
  • Branches packaging

Comments (0)

Files changed (1)

scripts/install_desk.py

+# Script to install desktop files and icons
+import sys, optparse
+import os,shutil
+
+def install_icon(name, size):
+    dest = os.path.join(prefix, "share/icons/hicolor", size, name)
+    shutil.copy(
+        os.path.join("icon", size, name),
+        dest)
+    print "Installed",dest
+
+parser = optparse.OptionParser()
+parser.add_option("--prefix", default=sys.exec_prefix)
+
+options,args = parser.parse_args()
+prefix = options.prefix
+
+print "Installing desktop files"
+res = os.system("desktop-file-install filesnake.desktop")
+
+if res != 0:
+    print "Error"
+    sys.exit(res)
+
+print "Installing icons"
+install_icon("filesnake.png", "48x48")
+install_icon("filesnake.png", "16x16")
+install_icon("filesnake.svg", "scalable")
+