Esempio n. 1
0
    extract_zipfile("GPG 4 USB [Linux]", tempdir + "/" + parser.get("gpg4usb", "file"), parser.get("gpg4usb", "path"))
    extract_tarfile(
        "Vidalia [Linux]", tempdir + "/" + parser.get("vidalia_linux", "file"), parser.get("vidalia_linux", "path")
    )

    # Extract Mac Applications

    # fixed seven_zip
    # extract_dmg("Thunderbird [Mac OS]", os.path.join(tempdir, parser.get('thunderbird_mac', 'file')), parser.get('thunderbird_mac', 'path'))
    # os.path.join(tempdir,
    # os.path.join(mountpoint,
    mainLogger.debug(
        "file: {}\npath:{}".format(parser.get("thunderbird_mac", "file"), parser.get("thunderbird_mac", "path"))
    )

    tb = SevenZip(os.path.join(tempdir, parser.get("thunderbird_mac", "file")))
    tb.extract_smart(os.path.join(mountpoint, parser.get("thunderbird_mac", "path")))

    parser.set(
        "torbirdy",
        "path",
        os.path.join(
            parser.get("thunderbird_mac", "path"), "Thunderbird.app/Contents/MacOS/distribution/extensions/torbirdy"
        ),
    )
    extract_zipfile("Torbirdy", tempdir + "/" + parser.get("torbirdy", "file"), parser.get("torbirdy", "path"))
    os.rename(
        parser.get("torbirdy", "path"),
        os.path.join(
            parser.get("thunderbird_mac", "path"),
            "Thunderbird.app/Contents/MacOS/distribution/extensions/",
Esempio n. 2
0
    parser.set('torbirdy', 'path', os.path.join(parser.get('thunderbird_linux', 'path'), 'thunderbird/distribution/extensions/torbirdy'))
    extract_zipfile("Torbirdy", tempdir+"/"+parser.get('torbirdy', 'file'), parser.get('torbirdy', 'path'))
    os.rename(parser.get('torbirdy', 'path'), os.path.join(parser.get('thunderbird_linux', 'path'), 'thunderbird/distribution/extensions/', get_extension_id(os.path.join(parser.get('torbirdy', 'path'), 'install.rdf'))))

    parser.set('enigmail', 'path', os.path.join(parser.get('thunderbird_linux', 'path'), 'thunderbird/distribution/extensions/enigmail'))
    extract_zipfile("Enigmail", tempdir+"/"+parser.get('enigmail', 'file'), parser.get('enigmail', 'path'))
    os.rename(parser.get('enigmail', 'path'), os.path.join(parser.get('thunderbird_linux', 'path'), 'thunderbird/distribution/extensions/', get_extension_id(os.path.join(parser.get('enigmail', 'path'), 'install.rdf'))))

    extract_zipfile("GPG 4 USB [Linux]", tempdir+"/"+parser.get('gpg4usb', 'file'), parser.get('gpg4usb', 'path'))
    extract_tarfile("Vidalia [Linux]", tempdir+"/"+parser.get('vidalia_linux', 'file'), parser.get('vidalia_linux', 'path'))

    # Extract Mac Applications

    mainLogger.debug("file: {}\npath:{}".format(parser.get('thunderbird_mac', 'file'), parser.get('thunderbird_mac', 'path')))

    tb = SevenZip(os.path.join(tempdir, parser.get('thunderbird_mac', 'file')))
    tb.extract_smart(os.path.join(mountpoint, parser.get('thunderbird_mac', 'path')))

    parser.set('torbirdy', 'path', os.path.join(parser.get('thunderbird_mac', 'path'), 'Thunderbird/Thunderbird.app/Contents/MacOS/distribution/extensions/torbirdy'))
    extract_zipfile("Torbirdy", tempdir+"/"+parser.get('torbirdy', 'file'), parser.get('torbirdy', 'path'))
    os.rename(parser.get('torbirdy', 'path'), os.path.join(parser.get('thunderbird_mac', 'path'), 'Thunderbird/Thunderbird.app/Contents/MacOS/distribution/extensions/', get_extension_id(os.path.join(parser.get('torbirdy', 'path'), 'install.rdf'))))

    parser.set('enigmail', 'path', os.path.join(parser.get('thunderbird_mac', 'path'), 'Thunderbird/Thunderbird.app/Contents/MacOS/distribution/extensions/enigmail'))
    extract_zipfile("Enigmail", tempdir+"/"+parser.get('enigmail', 'file'), parser.get('enigmail', 'path'))
    os.rename(parser.get('enigmail', 'path'), os.path.join(parser.get('thunderbird_mac', 'path'), 'Thunderbird/Thunderbird.app/Contents/MacOS/distribution/extensions/', get_extension_id(os.path.join(parser.get('enigmail', 'path'), 'install.rdf'))))

    print os.path.join(tempdir, parser.get('gpg4mac', 'file'))
    gpg_mac = SevenZip(os.path.join(tempdir, parser.get('gpg4mac', 'file')))
    gpg_mac.extract_super_smart(os.path.join(parser.get('gpg4mac', 'path')))
    shutil.copytree(os.path.join(parser.get('gpg4mac', 'path'), 'usr/local/'), os.path.join(tc_mountpoint, "apps/mac/gpg4mac"))
Esempio n. 3
0
import os
import sys
import glob
import platform
from subprocess import call
from seven_zip import SevenZip

# data = 'test data'
file_name = 'multfiles.7z'
# add_to_archive = ['7za', 'a', '-t7z', file_name, '*.txt']
# call(add_to_archive)
# extract_from_archive = ['7z', 'x', file_name]
# call(extract_from_archive)
files = glob.glob('*.txt')
print(files)
seven = SevenZip()
# seven.create_archive_with(file_name, files)
destination = seven.extract_archive(file_name, 'files')
print('Files Extracted to: {0}'.format(destination))
Esempio n. 4
0
                os.path.join(parser.get('enigmail', 'path'), 'install.rdf'))))

    extract_zipfile("GPG 4 USB [Linux]",
                    tempdir + "/" + parser.get('gpg4usb', 'file'),
                    parser.get('gpg4usb', 'path'))
    extract_tarfile("Vidalia [Linux]",
                    tempdir + "/" + parser.get('vidalia_linux', 'file'),
                    parser.get('vidalia_linux', 'path'))

    # Extract Mac Applications

    mainLogger.debug("file: {}\npath:{}".format(
        parser.get('thunderbird_mac', 'file'),
        parser.get('thunderbird_mac', 'path')))

    tb = SevenZip(os.path.join(tempdir, parser.get('thunderbird_mac', 'file')))
    tb.extract_smart(
        os.path.join(mountpoint, parser.get('thunderbird_mac', 'path')))

    parser.set(
        'torbirdy', 'path',
        os.path.join(
            parser.get('thunderbird_mac', 'path'),
            'Thunderbird/Thunderbird.app/Contents/MacOS/distribution/extensions/torbirdy'
        ))
    extract_zipfile("Torbirdy", tempdir + "/" + parser.get('torbirdy', 'file'),
                    parser.get('torbirdy', 'path'))
    os.rename(
        parser.get('torbirdy', 'path'),
        os.path.join(
            parser.get('thunderbird_mac', 'path'),