┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/khns/servicemenudeinstallation
diff options
context:
space:
mode:
Diffstat (limited to 'src/khns/servicemenudeinstallation')
-rwxr-xr-xsrc/khns/servicemenudeinstallation23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/khns/servicemenudeinstallation b/src/khns/servicemenudeinstallation
new file mode 100755
index 000000000..eeadb4033
--- /dev/null
+++ b/src/khns/servicemenudeinstallation
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+require 'fileutils'
+topdir = ARGV[0] + "-dir"
+# try: deinstall.sh
+# try: deinstall
+# try: installKDE4.sh
+# try: installKDE4
+# try: install.sh
+# try: install
+dd = Dir.new(topdir)
+dd.read
+dd.read
+dir = dd.read
+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")
+File.new(file).chmod(0700)
+ fail() if !system(file + " --remove") && !system(file + " --delete") && !system(file + " --uninstall") && !system(file + " --deinstall")
+end
+FileUtils.rm_r(topdir) \ No newline at end of file