1616
1717PAGES_DIR=$1
1818
19- mkdir $PAGES_DIR
19+ mkdir -p $PAGES_DIR
2020STATS_DIR=$PAGES_DIR /statistics
21- mkdir $STATS_DIR
21+ mkdir -p $STATS_DIR
2222touch $STATS_DIR /index.html
2323echo " <html>" > $STATS_DIR /index.html
24- echo " <header>" >> index.html
25- echo " <h1>Statistics</h1>" >> index.html
26- echo " </header>" >> index.html
24+ echo " <head>" >> $STATS_DIR /index.html
25+ echo " <title>Statistics</title>" >> $STATS_DIR /index.html
26+ echo " </head>" >> $STATS_DIR /index.html
27+ echo " <h1>Statistics</h1>" >> $STATS_DIR /index.html
2728echo " <body>" >> $STATS_DIR /index.html
28- echo " <ul>" >> $STATS_DIR /index.html
2929# get supported products
3030products=$( echo -e " import ssg.constants\nprint(ssg.constants.product_directories)" | python3 | sed -s " s/'//g; s/,//g; s/\[//g; s/\]//g" )
3131for product in $products
3232do
3333 if [ -d build/$product ]; then
34+ echo " <h4>Product: ${product} </h4>" >> $STATS_DIR /index.html
35+ echo " <ul>" >> $STATS_DIR /index.html
3436 mkdir -p $STATS_DIR /$product
3537 if [ -f build/$product /product-statistics/statistics.html ]; then
3638 cp -rf build/$product /product-statistics $STATS_DIR /$product /product-statistics
37- echo " <li><a href=\" $product /product-statistics/statistics.html\" >Statistics for product: ${product} </a></li>" >> $STATS_DIR /index.html
39+ echo " <li><a href=\" $product /product-statistics/statistics.html\" >Product Statistics </a></li>" >> $STATS_DIR /index.html
3840 fi
3941 if [ -f build/$product /profile-statistics/statistics.html ]; then
4042 cp -rf build/$product /profile-statistics $STATS_DIR /$product /profile-statistics
41- echo " <li><a href=\" $product /profile-statistics/statistics.html\" >Profile statistics for product: ${product} </a></li>" >> $STATS_DIR /index.html
43+ echo " <li><a href=\" $product /profile-statistics/statistics.html\" >Profile statistics</a></li>" >> $STATS_DIR /index.html
4244 fi
45+ echo " </ul>" >> $STATS_DIR /index.html
4346 fi
4447done
45- echo " </ul>" >> $STATS_DIR /index.html
4648echo " </body>" >> $STATS_DIR /index.html
4749echo " </html>" >> $STATS_DIR /index.html
4850
6062pushd build/tables
6163touch index.html
6264echo " <html>" > index.html
63- echo " <header>" >> index.html
65+ echo " <head>" >> index.html
66+ echo " <title>Mapping Tables</title>" >> index.html
67+ echo " </head>" >> index.html
6468echo " <h1>Mapping Tables</h1>" >> index.html
65- echo " </header>" >> index.html
6669echo " <body>" >> index.html
6770echo " <ul>" >> index.html
6871for table in table-* .html
@@ -74,33 +77,13 @@ echo "</body>" >> index.html
7477echo " </html>" >> index.html
7578popd
7679
77- # Generate SRG Mapping Tables
78- mkdir -p $PAGES_DIR /srg_mapping
79- pushd $PAGES_DIR /srg_mapping
80- touch index.html
81- echo " <html>" > index.html
82- echo " <header>" >> index.html
83- echo " <h1>SRG Mapping Tables</h1>" >> index.html
84- echo " </header>" >> index.html
85- echo " <body>" >> index.html
86- echo " <ul>" >> index.html
87- srg_products=" rhel9" # space separated list of products
88- for product in $srg_products
89- do
90- echo " <li><a href=\" srg-mapping-${product} .html\" >srg-mapping-${product} .html</a></li>" >> index.html
91- echo " <li><a href=\" srg-mapping-${product} .xlsx\" >srg-mapping-${product} .xlsx</a></li>" >> index.html
92- done
93- echo " </ul>" >> index.html
94- echo " </body>" >> index.html
95- echo " </html>" >> index.html
96- popd
97-
9880pushd $PAGES_DIR
9981touch index.html
10082echo " <html>" > index.html
101- echo " <header>" >> index.html
83+ echo " <head>" >> index.html
84+ echo " <title>Available Artifacts</title>" >> index.html
85+ echo " </head>" >> index.html
10286echo " <h1>Available Artifacts</h1>" >> index.html
103- echo " </header>" >> index.html
10487echo " <body>" >> index.html
10588echo " <ul>" >> index.html
10689echo " <li><a href=\" statistics/index.html\" >Statistics</a></li>" >> index.html
0 commit comments