Example #1
0
def createcompressedfile(srcdir, fname, target):
    # The following targets are supported:
    # unix - Unix lineendings, UTF-8 encoding and gzip compression
    # win  - Windows lineendings, 8859 enconding and zip compression
    # mac  - Unix lineendings, 8859 encoding and zip compression
    tmpworkdir = localconf.tmpdir + project
    fname = filesdir + fname
    srcdir = outputdir + srcdir + os.sep

    printdoc.safe_mkdir(tmpworkdir)
    printdoc.rmrf(tmpworkdir)

    # Create zip and tgz archives.  In order to get the right path in
    # the compressed files, copy the source to the temporary directory
    # with the project
    printdoc.rmrf(tmpworkdir)
    os.system('cp -R ' + srcdir + '* ' + tmpworkdir)

    if target == 'unix':
        os.system('cd ' + localconf.tmpdir + '; tar zcvf ' + fname + '.tgz ' +
                  project)

    if target == 'win':
        os.system('rm ' + fname + '.zip')
        printdoc.unix2dos(tmpworkdir)
        #printdoc.convertencoding(tmpworkdir,'ISO-8859-1')
        os.system('cd ' + localconf.tmpdir + '; zip -r ' + fname + '.zip ' +
                  project)

    if target == 'mac':
        os.system('rm ' + fname + '.zip')
        #printdoc.convertencoding(tmpworkdir,'ISO-8859-1')
        os.system('cd ' + localconf.tmpdir + '; zip -r ' + fname + '.zip ' +
                  project)
Example #2
0
def createcompressedfile(srcdir, fname, target):
    # The following targets are supported:
    # unix - Unix lineendings, UTF-8 encoding and gzip compression
    # win  - Windows lineendings, 8859 enconding and zip compression
    # mac  - Unix lineendings, 8859 encoding and zip compression
    tmpworkdir = localconf.tmpdir + project
    fname = filesdir + fname
    srcdir = outputdir + srcdir + os.sep

    printdoc.safe_mkdir(tmpworkdir)
    printdoc.rmrf(tmpworkdir)

    # Create zip and tgz archives.  In order to get the right path in
    # the compressed files, copy the source to the temporary directory
    # with the project
    printdoc.rmrf(tmpworkdir)
    os.system("cp -R " + srcdir + "* " + tmpworkdir)

    if target == "unix":
        os.system("cd " + localconf.tmpdir + "; tar zcvf " + fname + ".tgz " + project)

    if target == "win":
        os.system("rm " + fname + ".zip")
        printdoc.unix2dos(tmpworkdir)
        # printdoc.convertencoding(tmpworkdir,'ISO-8859-1')
        os.system("cd " + localconf.tmpdir + "; zip -r " + fname + ".zip " + project)

    if target == "mac":
        os.system("rm " + fname + ".zip")
        # printdoc.convertencoding(tmpworkdir,'ISO-8859-1')
        os.system("cd " + localconf.tmpdir + "; zip -r " + fname + ".zip " + project)
Example #3
0
def createbinaryfile(filename, ext, target):
    tmpworkdir = outputdir + project + "-mat"
    bdir = outputdir + project + "-" + ext

    printdoc.safe_mkdir(bdir)
    printdoc.rmrf(bdir)

    s = "cp -r " + tmpworkdir + "/* " + bdir
    os.system(s)

    s = "cp -r " + outputdir + project + "-" + ext + "-addon/* " + bdir
    os.system(s)

    createcompressedfile(project + "-" + ext, project + "-" + versionstring + "-" + ext, target)
Example #4
0
def createbinaryfile(filename, ext, target):
    tmpworkdir = outputdir + project + '-mat'
    bdir = outputdir + project + '-' + ext

    printdoc.safe_mkdir(bdir)
    printdoc.rmrf(bdir)

    s = 'cp -r ' + tmpworkdir + '/* ' + bdir
    os.system(s)

    s = 'cp -r ' + outputdir + project + '-' + ext + '-addon/* ' + bdir
    os.system(s)

    createcompressedfile(project + '-' + ext,
                         project + '-' + versionstring + '-' + ext, target)
Example #5
0
# ------- do not edit below this line ----------

# Import the localconf file, it should be placed in the same directory
# as this function is called from.

sys.path.append(cwd)
import localconf

outputdir = localconf.outputdir

sys.path.append(localconf.mat2docdir)
#import mat2doc
import printdoc

# Safely create directories if they are missing
printdoc.safe_mkdir(outputdir)
printdoc.safe_mkdir(localconf.tmpdir)

# This is run if the file is called from the command line
project = sys.argv[1]
todo = sys.argv[2]
redomode = 'auto'
if len(sys.argv) > 3:
    redomode = sys.argv[3]

projectdir = localconf.projects[project]
host = localconf.webserver[project]
remotedir = localconf.remotedir[project]

filesdir = outputdir + project + '-files' + os.sep
printdoc.safe_mkdir(filesdir)
Example #6
0
# ------- do not edit below this line ----------

# Import the localconf file, it should be placed in the same directory
# as this function is called from.

sys.path.append(cwd)
import localconf

outputdir = localconf.outputdir

sys.path.append(localconf.mat2docdir)
# import mat2doc
import printdoc

# Safely create directories if they are missing
printdoc.safe_mkdir(outputdir)
printdoc.safe_mkdir(localconf.tmpdir)

# This is run if the file is called from the command line
project = sys.argv[1]
todo = sys.argv[2]
redomode = "auto"
if len(sys.argv) > 3:
    redomode = sys.argv[3]

projectdir = localconf.projects[project]
host = localconf.webserver[project]
remotedir = localconf.remotedir[project]

filesdir = outputdir + project + "-files" + os.sep
printdoc.safe_mkdir(filesdir)