Added scripts to update version headers

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorsPackage@40 08cae9ef-cb74-4d14-b03a-d7ea46f178d7
This commit is contained in:
bergamaschi 2012-12-17 14:56:01 +00:00
parent b573014a02
commit 587c03b246
4 changed files with 67 additions and 5 deletions

View File

@ -92,6 +92,8 @@ clean:
# cd $(MANDIR) && $(MAKE) clean # cd $(MANDIR) && $(MAKE) clean
# cd $(DOCDIR) && rm -rf * # cd $(DOCDIR) && rm -rf *
install_lib: install_lib:
cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES) cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR) cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)

19
genVersionHeader.sh Executable file
View File

@ -0,0 +1,19 @@
#####! /bin/awk -f
if [ $# -lt 3 ]
then
echo "wrong usage"
exit -1
fi
fin=$1
ftmp=$2
fout=$3
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

View File

@ -110,19 +110,19 @@
\tableofcontents \tableofcontents
\clearpage \clearpage
\chapter{SLS Detectors Software} \chapter{SLS Detectors Software}
\include{slsDetector-softFAQ} \input{slsDetector-softFAQ}
\chapter{General questions about detectors} \chapter{General questions about detectors}
\include{generalDet-FAQ} %\input{generalDet-FAQ}
\chapter{Single photon counting detectors} \chapter{Single photon counting detectors}
\include{singlePhotonCounting-FAQ} %\input{singlePhotonCounting-FAQ}
\chapter{Charge Integrating detectors} \chapter{Charge Integrating detectors}
\include{chargeInt-FAQ} %\input{chargeInt-FAQ}
\chapter{Angular conversion} \chapter{Angular conversion}
\include{angConv-FAQ} %\input{angConv-FAQ}
\end{document} \end{document}

41
updateSvnVersion.sh Executable file
View File

@ -0,0 +1,41 @@
# Script to create svnInfo.txt files and export software
#folders
MAINDIR=slsDetectorsPackage
LIBDIR=slsDetectorSoftware
GUIDIR=slsDetectorGuiOriginal
CALWIZDIR=calibrationWizards
SVNPATH=file:///afs/psi.ch/project/sls_det_software/svn
MAINDIRSVN=$SVNPATH/$MAINDIR
LIBDIRSVN=$SVNPATH/$LIBDIR
GUIDIRSVN=$SVNPATH/$GUIDIR
CALWIZSVN=$SVNPATH/$GUIDIR
#export
#svn export --force $MAINDIRSVN
#cd $MAINDIR
#svn export --force $LIBDIRSVN
#svn export --force $GUIDIRSVN
#svn export --force $CALWIZSVN
#create svnInfo.txt
svn info $LIBDIRSVN > $LIBDIR/svnInfo.txt
./genVersionHeader.sh $LIBDIR/svnInfo.txt $LIBDIR/slsDetector/svnInfoLibTmp.h $LIBDIR/slsDetector/svnInfoLib.h
svn info $LIBDIRSVN/mythenDetectorServer > $LIBDIR/mythenDetectorServer/svnInfo.txt
./genVersionHeader.sh $LIBDIR/mythenDetectorServer/svnInfo.txt $LIBDIR/mythenDetectorServer/svnInfoMythenTmp.h $LIBDIR/mythenDetectorServer/svnInfoMythen.h
svn info $LIBDIRSVN/gotthardDetectorServer > $LIBDIR/gotthardDetectorServer/svnInfo.txt
./genVersionHeader.sh $LIBDIR/gotthardDetectorServer/svnInfo.txt $LIBDIR/gotthardDetectorServer/svnInfoGotthardTmp.h $LIBDIR/gotthardDetectorServer/svnInfoGotthard.h
svn info $GUIDIRSVN > $GUIDIR/svnInfo.txt
./genVersionHeader.sh $GUIDIR/svnInfo.txt $GUIDIR/include/svnInfoGuiTmp.h $GUIDIR/include/svnInfoGui.h
svn info $CALWIZSVN > $CALWIZDIR/svnInfo.txt
./genVersionHeader.sh $CALWIZDIR/svnInfo.txt $CALWIZDIR/svnInfoCalWizTmp.h $CALWIZDIR/svnInfoCalWiz.h
exit 0