From ad81d5538f73fd64f0dd775bfc8101b0a238930e Mon Sep 17 00:00:00 2001 From: gutosie Date: Mon, 22 Feb 2021 10:54:48 +0200 Subject: [PATCH] Add files via upload --- NeoBoot/files/tools.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/NeoBoot/files/tools.py b/NeoBoot/files/tools.py index 3effcdd..5fb012c 100644 --- a/NeoBoot/files/tools.py +++ b/NeoBoot/files/tools.py @@ -1878,23 +1878,24 @@ class Opis(Screen): def neogithub(self, answer): if answer is True: - system('rm -rf ' + LinkNeoBoot + '/.location') - if fileExists('/usr/bin/fullwget'): - cmd1 = 'cd /tmp; rm ./*.sh; fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh;chmod 755 ./iNB.sh;sh ./iNB.sh; rm ./iNB.sh; cd /' - self.session.open(Console, _('NeoBoot....'), [cmd1]) - self.close() - elif fileExists('/usr/bin/curl'): + if fileExists('' + LinkNeoBoot + '/.location'): + system('rm -f ' + LinkNeoBoot + '/.location') + if fileExists('/usr/bin/curl'): cmd1 = 'curl -kLs https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh|sh' self.session.open(Console, _('NeoBoot....'), [cmd1]) self.close() elif fileExists('/usr/bin/wget'): cmd1 = 'cd /tmp; rm ./*.sh; wget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh;chmod 755 ./iNB.sh;sh ./iNB.sh; rm ./iNB.sh; cd /' self.session.open(Console, _('NeoBoot....'), [cmd1]) - self.close() + self.close() + elif fileExists('/usr/bin/fullwget'): + cmd1 = 'cd /tmp; rm ./*.sh; fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh;chmod 755 ./iNB.sh;sh ./iNB.sh; rm ./iNB.sh; cd /' + self.session.open(Console, _('NeoBoot....'), [cmd1]) + self.close() else: - pass + pass else: - self.close() + self.close() def delete(self): message = _('Are you sure you want to completely remove NeoBoota of your image?\n\nIf you choose so all directories NeoBoota will be removed.\nA restore the original image settings Flash.')