]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fixed install/deinstall scripts
authorJonathan Schmidt-Dominé <devel@the-user.org>
Sat, 12 Jun 2010 23:38:00 +0000 (23:38 +0000)
committerJonathan Schmidt-Dominé <devel@the-user.org>
Sat, 12 Jun 2010 23:38:00 +0000 (23:38 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1137451

src/khns/servicemenudeinstallation
src/khns/servicemenuinstallation

index 42c451e6c3438e44ca199c40cdc0d0536141d46e..a1c71efa7edb7023d9ce1a49f6adef251017388c 100755 (executable)
@@ -5,24 +5,26 @@ if archive[(archive.length - 8)..(archive.length)] == ".desktop"
     FileUtils.rm(`kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/" + File.basename(archive))
     exit(0)
 end
-topdir = archive + "-dir"
+dir = archive + "-dir"
 # try: deinstall.sh
 # try: deinstall
 # try: installKDE4.sh
 # try: installKDE4
 # try: install.sh
 # try: install
-dd = Dir.new(topdir)
+dd = Dir.new(dir)
 dd.read
 dd.read
-dir = dd.read
+dir += "/" + dd.read
+dd = nil
+Dir.chdir(dir)
 def fail()
     system("kdialog --passivepopup \"Deinstallation failed\" 15")
     exit(-1)
 end
-if !((File.exist?(file = dir + "/deinstall.sh") || File.exist?(file = dir + "/deinstall")) && system(file))
-    fail() if !File.exist?(file = dir + "/installKDE4.sh") && !File.exist?(file = dir + "/installKDE4") && !File.exist?(file = dir + "/install.sh") && !File.exist?(file = dir + "/install")
+if !((File.exist?(file = "./deinstall.sh") || File.exist?(file = "./deinstall")) && system(file))
+    fail() if !File.exist?(file = "./installKDE4.sh") && !File.exist?(file = "./installKDE4") && !File.exist?(file = "./install.sh") && !File.exist?(file = "./install")
 File.new(file).chmod(0700)
     fail() if !system(file + " --remove") && !system(file + " --delete") && !system(file + " --uninstall") && !system(file + " --deinstall")
 end
-FileUtils.rm_r(topdir)
+FileUtils.rm_r(dir)
index a580ce91080024c53b1760fc151aebfbbf7f9a34..b99cc3b00eb3af05a561b21542e14ace11175d41 100755 (executable)
@@ -55,7 +55,7 @@ def uncompress(filename, output)
 end
 dir = archive + "-dir"
 if File.exist?(dir)
-    FileleUtils.rm_r(dir)
+    FileUtils.rm_r(dir)
 end
 FileUtils.mkdir(dir)
 exit(-1) if !uncompress(archive, dir)
@@ -70,12 +70,13 @@ dd.read
 dd.read
 dir += "/" + dd.read
 dd = nil
+Dir.chdir(dir)
 def fail()
     system("kdialog --passivepopup \"Installation failed\" 15")
     exit(-1)
 end
-if !((File.exist?(file = dir + "/install-it.sh") || File.exist?(file = dir + "/install-it")) && system(file))
-    fail() if !File.exist?(file = dir + "/installKDE4.sh") && !File.exist?(file = dir + "/installKDE4") && !File.exist?(file = dir + "/install.sh") && !File.exist?(file = dir + "/install")
+if !((File.exist?(file = "./install-it.sh") || File.exist?(file = "./install-it")) && system(file))
+    fail() if !File.exist?(file = "./installKDE4.sh") && !File.exist?(file = "./installKDE4") && !File.exist?(file = "./install.sh") && !File.exist?(file = "./install")
     File.new(file).chmod(0700)
     fail() if !system(file + " --local") && !system(file + "--local-install") && !system(file + " --install")
 end