install.py

branch
5_0_x
changeset 462
ac91c502254e
parent 391
68e4164b709d
child 567
5dcea6a6c0d0
--- a/install.py	Sun Aug 01 17:44:13 2010 +0200
+++ b/install.py	Fri Aug 06 18:55:32 2010 +0200
@@ -421,10 +421,14 @@
     # create menu entry for Linux systems
     if sys.platform.startswith("linux"):
         if distDir:
-            shutil.copy(os.path.join("eric", "icons", "default", "eric.png"), 
-                os.path.normpath(os.path.join(distDir, "/usr/share/pixmaps")))
-            shutil.copy(os.path.join("eric", "eric5.desktop"), 
-                os.path.normpath(os.path.join(distDir, "/usr/share/applications")))
+            dst = os.path.normpath(os.path.join(distDir, "usr/share/pixmaps"))
+            if not os.path.exists(dst):
+                os.makedirs(dst)
+            shutil.copy(os.path.join("eric", "icons", "default", "eric.png"), dst)
+            dst = os.path.normpath(os.path.join(distDir, "usr/share/applications"))
+            if not os.path.exists(dst):
+                os.makedirs(dst)
+            shutil.copy(os.path.join("eric", "eric5.desktop"), dst)
         else:
             shutil.copy(os.path.join("eric", "icons", "default", "eric.png"), 
                 "/usr/share/pixmaps")

eric ide

mercurial