Skip to content

Commit 0b93cb0

Browse files
Switched to sed editing of template version file
1 parent ecbbc58 commit 0b93cb0

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ LSST_Observing_Strategy_White_Paper.pdf
2121
# *.ps
2222
# *.eps
2323
# *.pdf
24-
version.tex
2524

2625
## Bibliography auxiliary files (bibtex/biblatex/biber):
2726
*.bbl

whitepaper/LSST_Observing_Strategy_White_Paper.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{\Large with support from the LSST Project. }\\
3939
\vspace*{\stretch{1}}
4040

41-
\input{version.tex}
41+
\input{thisversion.tex}
4242

4343
\end{center}
4444
\end{titlepage}

whitepaper/gen_version.csh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,15 @@ set commit_url = "https://github.com/LSSTScienceCollaborations/ObservingStrategy
7878
set version = "${version}.${short_SHA}"
7979

8080
# Write tex file for input into paper:
81-
set texfile = "version.tex"
81+
set texfile = "thisversion.tex"
82+
set template = "version.tex"
8283
\rm -f $texfile ; touch $texfile
8384

84-
echo "\begin{center}{" >> $texfile
85-
echo " {\large\bf Version ${version}}\\ " >> $texfile
86-
echo " \vspace*{\stretch{0.1}}" >> $texfile
87-
echo " Most recent commit: \href{${commit_url}}{\texttt{$short_SHA}}\\ " >> $texfile
88-
echo " \vspace*{\stretch{0.1}}" >> $texfile
89-
echo " (${date})}\\ " >> $texfile
90-
echo "\end{center}" >> $texfile
85+
cat $template | \
86+
sed s%XX%"${version}"%g | \
87+
sed s%URL%"${commit_url}"%g | \
88+
sed s%SHA%"${short_SHA}"%g | \
89+
sed s%DATE%"${date}"%g > $texfile
9190

9291
cat $texfile
9392

whitepaper/version.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\begin{center}{
2+
{\large\bf Version XX}\\
3+
\vspace*{\stretch{0.1}}
4+
Most recent commit: \href{URL}{\texttt{SHA}}\\
5+
\vspace*{\stretch{0.1}}
6+
(DATE)}\\
7+
\end{center}

0 commit comments

Comments
 (0)