forked from NAG-DevOps/speed-hpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-software-list.sh
executable file
·79 lines (61 loc) · 2.05 KB
/
generate-software-list.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/encs/bin/bash
# Generates .tex and .md versions of the software list
# Serguei Mokhov
GENERATED_ON=`date`
OUTFILE="software-list"
# Generate the LaTeX version first
cat > "$OUTFILE.tex" << LATEX_HEADER
% -----------------------------------------------------------------------------
% $0
\section{Software Installed On Speed}
\label{sect:software-details}
This is a generated section by a script; last updated on \textit{$GENERATED_ON}.
We have two major software trees: Scientific Linux 7 (EL7), which is
outgoing, and AlmaLinux 9 (EL9). After major synchronization of software
packages is complete, we will stop maintaining the EL7 tree and
will migrate the remaining nodes to EL9.
Use \option{--constraint=el7} to select EL7-only installed nodes for their
software packages. Conversely, use \option{--constraint=el9} for the EL9-only
software. These options would be used as a part of your job parameters
in either \api{\#SBATCH} or on the command line.
\noindent
\textbf{NOTE:} this list does not include packages installed directly on the OS (yet).
% -----------------------------------------------------------------------------
\subsection{EL7}
\label{sect:software-el7}
Not all packages are intended for HPC, but the common tree is available
on Speed as well as teaching labs' desktops.
\scriptsize
\begin{multicols}{3}
\begin{itemize}
LATEX_HEADER
ls -1 /encs/ArchDep/x86_64.EL7/pkg/ \
| egrep -v HIDE \
| sed 's/^/\\item \\verb|/g' \
| sed 's/$/|/g' \
>> "$OUTFILE.tex"
cat >> "$OUTFILE.tex" << LATEX_EL9_HEADER
\end{itemize}
\end{multicols}
\normalsize
% -----------------------------------------------------------------------------
\subsection{EL9}
\label{sect:software-el9}
\scriptsize
\begin{multicols}{3}
\begin{itemize}
LATEX_EL9_HEADER
ls -1 /encs/ArchDep/x86_64.EL9/pkg/ \
| egrep -v HIDE \
| sed 's/^/\\item \\verb|/g' \
| sed 's/$/|/g' \
>> "$OUTFILE.tex"
cat >> "$OUTFILE.tex" << LATEX_FOOTER
\end{itemize}
\end{multicols}
\normalsize
% EOF
LATEX_FOOTER
# Get .md version of the same from LaTeX
pandoc -s "$OUTFILE.tex" -o "$OUTFILE.md"
# EOF