Sat, 09 Aug 2014 12:23:18 +0200
Improved install script for non-root installations.
install.py | file | annotate | diff | comparison | revisions | |
uninstall.py | file | annotate | diff | comparison | revisions |
--- a/install.py Wed Aug 06 18:54:06 2014 +0200 +++ b/install.py Sat Aug 09 12:23:18 2014 +0200 @@ -401,7 +401,7 @@ global pyModDir, progLanguages # Remove the menu entry for Linux systems - if sys.platform.startswith("linux"): + if sys.platform.startswith("linux") and os.getuid() == 0: for name in ["/usr/share/pixmaps/eric.png", "/usr/share/applications/eric6.desktop", "/usr/share/appdata/eric6.appdata.xml", @@ -698,7 +698,7 @@ if not os.path.exists(dst): os.makedirs(dst) shutilCopy(os.path.join(sourceDir, "eric6.appdata.xml"), dst) - else: + elif os.getuid() == 0: shutilCopy(os.path.join( sourceDir, "icons", "default", "eric.png"), "/usr/share/pixmaps/eric.png")
--- a/uninstall.py Wed Aug 06 18:54:06 2014 +0200 +++ b/uninstall.py Sat Aug 09 12:23:18 2014 +0200 @@ -99,9 +99,10 @@ global pyModDir # Remove the menu entry for Linux systems - if sys.platform.startswith("linux"): + if sys.platform.startswith("linux") and os.getuid() == 0: for name in ["/usr/share/pixmaps/eric.png", "/usr/share/applications/eric6.desktop", + "/usr/share/appdata/eric6.appdata.xml", "/usr/share/pixmaps/ericWeb.png", "/usr/share/applications/eric6_webbrowser.desktop"]: if os.path.exists(name):