versioning scripts now work

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorsPackage@41 08cae9ef-cb74-4d14-b03a-d7ea46f178d7
This commit is contained in:
bergamaschi 2012-12-17 15:40:30 +00:00
parent 587c03b246
commit c9a9d0103f
2 changed files with 8 additions and 2 deletions

View File

@ -12,8 +12,14 @@ fin=$1
ftmp=$2
fout=$3
#dat=echo "date '+%Y%m%d'"
echo "in: $fin tmp: $ftmp out: $fout"
#awk 'NR==FNR {if ($3=="Date:") {l[FNR]=$4; gsub("-","",l[FNR]);} else { if (match($0,"Rev")) {l[FNR]=$(NF);} else {l[FNR]="\""$(NF)"\"";};};next} {$0=$1" "$2" "l[FNR]}1' $fin $ftmp > $fout
awk 'NR==FNR {if (match($0,"Rev")) {l[0]=$(NF);} else if (match($0,"Date")) {l[1]=$4; gsub("-","",l[1]);} else if (match($0,"URL")) {l[2]="\""$(NF)"\"";} else if (match($0,"Author")) {l[3]="\""$(NF)"\"";} else if (match($1,"UUID")) {l[4]="\""$(NF)"\"";};next;} {if (match($2,"REV")) {$0=$1" "$2" "l[0];} else if (match($2,"DATE")) {$0=$1" "$2" "l[1];} else if (match($2,"URL")) {$0=$1" "$2" "l[2];} else if (match($2,"AUTH")) {$0=$1" "$2" "l[3];} else if (match($2,"UUID")) {$0=$1" "$2" "l[4];}}1' $fin $ftmp > $fout
awk 'BEGIN {l[0]=0; "date +%Y%m%d" | getline l[1]; l[2]="\"/\""; l[3]="\"nobody\""; l[3]="\"nobody\""; l[4]="\"0000-0000-0000\"";} \
NR==FNR {if (match($0,"Rev")) {l[0]="0x"$(NF);} else if (match($0,"Date")) {l[1]="0x"$4; gsub("-","",l[1]);} else if (match($0,"URL")) {l[2]="\""$(NF)"\"";} else if (match($0,"Author")) {l[3]="\""$(NF)"\"";} else if (match($0,"UUID")) {l[4]="\""$(NF)"\"";};next;}
{if (match($2,"REV")) {$0=$1" "$2" "l[0];} else if (match($2,"DATE")) {$0=$1" "$2" "l[1];} else if (match($2,"URL")) {$0=$1" "$2" "l[2];} else if (match($2,"AUTH")) {$0=$1" "$2" "l[3];} else if (match($2,"UUID")) {$0=$1" "$2" "l[4];}}1' $fin $ftmp > $fout

View File

@ -3,7 +3,7 @@
#folders
MAINDIR=slsDetectorsPackage
LIBDIR=slsDetectorSoftware
GUIDIR=slsDetectorGuiOriginal
GUIDIR=slsDetectorGui
CALWIZDIR=calibrationWizards
SVNPATH=file:///afs/psi.ch/project/sls_det_software/svn