mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Better servicemenu(de)installation
This commit is contained in:
parent
7df8488125
commit
860011c4c5
2 changed files with 25 additions and 11 deletions
|
@ -12,11 +12,18 @@ dir = archive + "-dir"
|
|||
# try: installKDE4
|
||||
# try: install.sh
|
||||
# try: install
|
||||
dd = Dir.new(dir)
|
||||
dd.read
|
||||
dd.read
|
||||
dir += "/" + dd.read
|
||||
dd = nil
|
||||
while true
|
||||
dd = Dir.new(dir)
|
||||
break if dd.count != 3
|
||||
odir = dir
|
||||
for entry in dd
|
||||
dir += "/" + entry if entry != "." && entry != ".."
|
||||
end
|
||||
if !File.directory? dir
|
||||
dir = odir
|
||||
break
|
||||
end
|
||||
end
|
||||
Dir.chdir(dir)
|
||||
def fail()
|
||||
system("kdialog --passivepopup \"Deinstallation failed\" 15")
|
||||
|
|
|
@ -65,11 +65,18 @@ exit(-1) if !uncompress(archive, dir)
|
|||
# try: installKDE4
|
||||
# try: install.sh
|
||||
# try: install
|
||||
dd = Dir.new(dir)
|
||||
dd.read
|
||||
dd.read
|
||||
dir += "/" + dd.read
|
||||
dd = nil
|
||||
while true
|
||||
dd = Dir.new(dir)
|
||||
break if dd.count != 3
|
||||
odir = dir
|
||||
for entry in dd
|
||||
dir += "/" + entry if entry != "." && entry != ".."
|
||||
end
|
||||
if !File.directory? dir
|
||||
dir = odir
|
||||
break
|
||||
end
|
||||
end
|
||||
Dir.chdir(dir)
|
||||
def fail()
|
||||
system("kdialog --passivepopup \"Installation failed\" 15")
|
||||
|
@ -79,4 +86,4 @@ if !((File.exist?(file = "./install-it.sh") || File.exist?(file = "./install-it"
|
|||
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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue