Ignore:
Timestamp:
May 20, 2010, 9:36:39 PM (16 years ago)
Author:
civer
Message:

[IPK /AddonManager/downloader.py]

  • added new file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source/system_addonmanager_2_0/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py

    r2935 r3385  
    828828                        if self.box == "cuberevo" or self.box == "cuberevo-mini" or self.box == "cuberevo-mini2":
    829829                                self.box = "cuberevo"
    830                         if self.box == "ufs910" or self.box == "hdbox":
    831                                 self.box = "ufs910"
    832                                 print "[Addon-Manager]" + self.box
     830      # ocatgon1008 = av700
     831                        #if self.box == "octagon1008":
     832                        #       self.box = "hdbox"
     833                        #if self.box == "ufs910" or self.box == "hdbox":
     834                        #       self.box = "ufs910"
     835                        #       print "[Addon-Manager]" + self.box
    833836
    834837#----- you press au Menu-key, define the urls----------------------------------
     
    13011304                                file.close()
    13021305
     1306                                ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")
     1307                                ffile.write("ausgelesene Box:" + self.box)
     1308                                ffile.write("\n")
     1309                                ffile.close()
     1310                                # Topfield "TF7700HDPVR"
     1311                                if self.box == "cuberevo" or self.box == "cuberevo-mini" or self.box == "cuberevo-mini2":
     1312                                        self.box = "cuberevo"
     1313                                # ocatgon1008 = av700
     1314                                #if self.box == "octagon1008":
     1315                                #       self.box = "hdbox"
     1316                                #if self.box == "ufs910" or self.box == "hdbox":
     1317                                #       self.box = "ufs910"
     1318
     1319                                ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")
     1320                                ffile.write("zugeordnete Box:" + self.box)
     1321                                ffile.write("\n")
     1322                                ffile.close()
     1323
    13031324                                self["statusbar"].text = _("Decompressing Tar-File...")
    13041325                                os.system("cd /tmp/aaf; tar -xzf downfile.tar.gz; sync")
     
    13311352                                                freesize = int(freesize)
    13321353                                        print "[Addon-Manager] Flash=", freesize
    1333                                         #GOst ---> cut -c1-4 -nach-> cut -d\t -f1
     1354                                        #GOst cut -c1-4 -nach cut -d\t -f1
     1355                                        os.system("sync; sleep 2")
    13341356                                        os.system("du -sc /tmp/aaf |grep total|cut -d\t -f1 >/tmp/free2.txt")
    1335                                         if os.path.exists("/tmp/free2.txt") is True:
    1336                                                 f = open("/tmp/free2.txt", "r" )
    1337                                                 for line in f:
    1338                                                         filesize = line.lstrip()
    1339                                                 f.close
    1340                                                 filesize = filesize.replace("\n","")
    1341                                                 filesize = int(filesize)
     1357                                        #if os.path.exists("/tmp/free2.txt") is True:
     1358                                        #       f = open("/tmp/free2.txt", "r" )
     1359                                        #       for line in f:
     1360                                        #               filesize = line.lstrip()
     1361                                        #       f.close
     1362                                        #       filesize = filesize.replace("\n","")
     1363                                        #       filesize = int(filesize)
    13421364                                        print "[Addon-Manager] File=", filesize
    13431365
     
    14051427                                                        # und nun in der ufs910 im Flash den emu installieren
    14061428                                                        os.system("rm /tmp/aaf/*.tar.gz ; sync")
    1407                                                         #os.system("cp -RP /tmp/aaf/* / ; sync") # error when by softlink
    1408                                                         os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cd /tmp/aaf; cp_r /tmp/aaf /)" )
    1409 
     1429                                                        os.system("cp -RP /tmp/aaf/* / ; sync")
    14101430                                                        if self.swaptest == True:
    14111431                                                                os.system("cd /usr/lib/enigma2/python/Plugins/Extensions/AddonManager; ./do_link.sh")
    14121432                                                                print "[Addon-Manager] Emu wude nach /var/swap/bin verlinkt"
    14131433
    1414                                 # 14.03.2010 abgeschaltet wegen TF Softlink
    14151434                                if os.path.exists("/tmp/aaf/inst.sh") is True:
    14161435                                        print "[Addon-Manager] Preinst gefunden (inst.sh)"
    1417                                         #os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cd /tmp/aaf; ./inst.sh)" )
    1418                                         os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cd /tmp/aaf; cp_r /tmp/aaf /; sync)" )
    1419 
     1436                                        #os.system("sed -e 's/cp -RP /. \/usr\/lib\/enigma2\/python\/Plugins\/Extensions\/AddonManager\/cp_r.func; cp_r \/tmp\/aaf\//g' -i /tmp/aaf/inst.sh")
     1437                                        #os.system("sed -e 's/cp -RP /cp_r /g' -i /tmp/aaf/inst.sh")
     1438                                        #os.system("cd /tmp/aaf; ./inst.sh" )
     1439                                        os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cd /tmp/aaf; ./inst.sh)" )
     1440                                        #os.system("rm -r /tmp/aaf")
     1441                                        #os.system("cd / ; rm *tar.gz ; rm inst.sh")
    14201442                                else:
    14211443                                        # Boxtyp lesen
     
    14241446                                        file.close()
    14251447                                        # Topfield "TF7700HDPVR"
     1448                                        if self.box == "cuberevo" or self.box == "cuberevo-mini" or self.box == "cuberevo-mini2":
     1449                                                self.box = "cuberevo"
     1450                                        # ocatgon1008 = av700
     1451                                        #if self.box == "octagon1008":
     1452                                        #       self.box = "hdbox"
     1453                                        #if self.box == "ufs910" or self.box == "hdbox":
     1454                                        #       self.box = "ufs910"
     1455
     1456                                        # Topfield "TF7700HDPVR"
    14261457                                        ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")
    14271458                                        ffile.write("erkannter Boxtyp:" + self.box)
     
    14411472                                                        self.box = "cuberevo"
    14421473
    1443                                                 if self.box == "ufs910" or self.box == "UFS922" or self.box == "cuberevo":
     1474                                                if self.box == "ufs910" or self.box == "UFS922" or self.box == "cuberevo" or self.box == "hdbox":
    14441475                                                        if self.plug == "bootbilder" or self.plug == "plugins":
    14451476                                                                ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")
     
    15121543                                                        ffile.write("es ist ein Flashimage aber keine ufs910")
    15131544                                                        ffile.write("\n")
    1514                                                         ffile.write("cp_r /tmp/aaf / ; sync")
     1545                                                        ffile.write("cp -RP /tmp/aaf/* / ; sync")
    15151546                                                        ffile.write("\n")
    15161547                                                        ffile.close()
    15171548                                                        #GOst begin
    15181549                                                        #os.system("cp -RP /tmp/aaf/* / ; sync")
    1519                                                         os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cd /tmp/aaf; cp_r /tmp/aaf / ; sync)" )
    1520 
    1521                                                         #os.system("(cd /tmp/aaf; tar -xzf *tar.gz -C / ; sync)")
     1550                                                        os.system("(cd /tmp/aaf; tar -xzf *tar.gz -C / ; sync)")
    15221551                                                        #GOst end
    15231552
     
    15271556                                                        ffile.write("es ist kein Flashimage")
    15281557                                                        ffile.write("\n")
    1529                                                         ffile.write("cp_r /tmp/aaf / ; sync")
     1558                                                        ffile.write("cp -RP /tmp/aaf/* / ; sync")
    15301559                                                        ffile.write("\n")
    15311560                                                        ffile.close()
    15321561                                                        #GOst begin
    1533                                                         os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cp_r /tmp/aaf / ; sync)")
    1534                                                         #os.system("(cd /tmp/aaf; tar -xzf *tar.gz -C / ; sync)")
     1562                                                        #os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cp_r /tmp/aaf / ; sync)")
     1563                                                        os.system("(cd /tmp/aaf; tar -xzf *tar.gz -C / ; sync)")
    15351564                                                        #GOst end
    15361565
     
    15471576                                os.system("rm -r /tmp/aaf")
    15481577
    1549 
    1550                 os.system("rm -r /tmp/aaf")
    1551                 os.system("cd / ; rm *tar.gz")
    15521578                os.system("mkdir /tmp/aaf")
    15531579                self["statusbar"].text = _("Installation OK!")
Note: See TracChangeset for help on using the changeset viewer.