LIB_FILE_PATH = "/home/me/projects/igs/meta.src"
STATIC_LIB_PATH = "/home/me/projects/igs/static/meta.src"
comp = get_shell.host_computer
file = comp.File(LIB_FILE_PATH)
lines = file.get_content.split(char(10))
prepend_index = lines.indexOf("// PREPEND_MARK") + 1
append_index = lines.indexOf("// APPEND_MARK") + 1
prepend_path = lines[prepend_index].split("""")[1]
append_path = lines[append_index].split("""")[1]
static_prepend = comp.File(prepend_path).get_content
append_prepend = comp.File(append_path).get_content
static_prepend = static_prepend.replace("""", """""")
append_prepend = append_prepend.replace("""", """""")
new_prepend_line = lines[prepend_index].split("=")[0] + " = " + """" + static_prepend + """"
new_append_line = lines[append_index].split("=")[0] + " = " + """" + append_prepend + """"
lines[prepend_index] = new_prepend_line
lines[append_index] = new_append_line
// ---------
comp.touch(STATIC_LIB_PATH.split("/")[0:-1].join("/"), STATIC_LIB_PATH.split("/")[-1])
comp.File(STATIC_LIB_PATH).set_content(lines.join(char(10)))