OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
1.4 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/sde-package/package-update.awk
# Copyright (C) 2007 - 2011 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
{
if ( $0 ~ /^\[V\]/ ) {
oldver_underscore = $2; gsub(/\./, "_", oldver_underscore );
oldver_dots = $2; gsub(/\./, "\\.", oldver_dots );
oldver_pattern = $2; gsub(/\./, "[_\\.]", oldver_pattern );
$2 = ver
}
else if ( $0 ~ /^\[D\]/ && $3 ~ ".*" oldver_pattern ".*" ) {
filename = $3;
if ( $3 ~ ".*" oldver_dots ".*" )
gsub( oldver_dots, ver, filename );
else {
ver_underscore = ver; gsub(/\./, "_", ver_underscore);
gsub( oldver_underscore, ver_underscore, filename );
}
if ( filename != $3 ) {
$2 = 0;
$3 = filename;
if ( location > "" ) {
$4 = location;
for (i=5;i<=NF;i++)
$i = "";
}
else if ( $4 ~ ".*/[0-9]+\\.[0-9]+/" ) {
ver = gensub( "([0-9]+\\.[0-9]+).*","\\1","", ver );
sub( "/[0-9]+\\.[0-9]+/", "/" ver "/", $4 );
}
else
for (i=4;i<=NF;i++)
gsub( oldver_pattern, ver, $i );
}
}
sub(/[ \t]+$/, "")
print $0;
}