BASIS  r3148
updatefile.py File Reference

Update file from template file while preserving custom sections (deprecated). More...

Go to the source code of this file.

Namespaces

namespace  updatefile

Functions

def updatefile::extractCustomizedSections
def updatefile::extractLicenseSections
def updatefile::help
def updatefile::replaceCustomizedSections
def updatefile::replaceLicenseSections
def updatefile::run
def updatefile::usage
def updatefile::version

Variables

string updatefile::customTag = "basis-custom"
 updatefile::force = False
string updatefile::inputFile = ""
string updatefile::licenseTag = "basis-license"
string updatefile::outputFile = ""
tuple updatefile::progName = os.path.basename(sys.argv [0])
string updatefile::templateFile = ""
string updatefile::tokenCustomEnd = "</"
string updatefile::tokenCustomStart = "<"
string updatefile::tokenKeepTemplate = "REMOVE_THIS_STRING_IF_YOU_WANT_TO_KEEP_YOUR_CHANGES"
string updatefile::tokenLicenseEnd = "</"
string updatefile::tokenLicenseStart = "<"
int updatefile::verbosity = 0

Detailed Description

Update file from template file while preserving custom sections (deprecated).

This script is used by the BasisUpdate.cmake module. This module is used to update files of a project instantiated from a particular revision of the BASIS project template during the configure step of CMake. This way, projects pull the changes of the compatible template automatically. Sections in the original file which are enclosed by the tokens <basis-custom> and </basis-custom> or <basis-license> and </basis-license> (without trailing spaces) are preserved while all other content is replaced by the template file. The customized sections are inserted into the template in the order they appear in the original file and the template file. If more custom sections are present in the original file than in the template file, these custom sections are appended at the end of the resulting file.

See the documentation of BasisUpdate.cmake for further details.

Copyright (c) 2011 University of Pennsylvania. All rights reserved.
See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.

Contact: SBIA Group <sbia-software at uphs.upenn.edu>

Definition in file updatefile.py.