Skip to content
Snippets Groups Projects
Commit 57c872d7 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

povolene stavy v tabulce - Salomon Maintenance, Anselm Maintenance, Back in...

povolene stavy v tabulce - Salomon Maintenance, Anselm Maintenance, Back in Production, Infrastructure Maintenance, PBS Maintenance, SCRATCH Maintenance, HOME Maintenance, Salomon and Anselm Maintenance
parent e5b4028b
No related branches found
No related tags found
4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
Pipeline #
...@@ -17,40 +17,37 @@ LAST=$(wc -l "$i" | cut -f1 -d' ') ...@@ -17,40 +17,37 @@ LAST=$(wc -l "$i" | cut -f1 -d' ')
DOWN=$((LAST-END+2)) DOWN=$((LAST-END+2))
sed '1,'"$((HEAD-1))"'d' "$i" | sed -n -e :a -e '1,'"$DOWN"'!{P;N;D;};N;ba' | sed '/<div/d' > "TMP.html" sed '1,'"$((HEAD-1))"'d' "$i" | sed -n -e :a -e '1,'"$DOWN"'!{P;N;D;};N;ba' | sed '/<div/d' > "TMP.html"
#sed '1,'"$((HEAD-1))"'d' "$i" | sed -n -e :a -e '1,'"$DOWN"'!{P;N;D;};N;ba' > "TMP.html" rm "$i"
title="Message of the day" title="Message of the day"
head=$(cat TMP.html | grep "rss-item-title" | cut -d ">" -f 2 | cut -d "<" -f 1) head=$(cat TMP.html | grep "rss-item-title" | cut -d ">" -f 2 | cut -d "<" -f 1)
date=$(cat TMP.html | grep "<i>" | cut -d ">" -f 2 | cut -d "<" -f 1 | cut -d " " -f 1) date=$(cat TMP.html | grep "<i>" | cut -d ">" -f 2 | cut -d "<" -f 1 | cut -d " " -f 1)
info=$(cat TMP.html | grep "<p>" | cut -d ">" -f 2 | cut -d "<" -f 1) info=$(cat TMP.html | grep "<p>" | cut -d ">" -f 2 | cut -d "<" -f 1)
rm TMP.html
echo "" echo ""
echo "$title" echo "$title"
echo "$head" echo "$date - $head"
echo "$date"
echo "$info" echo "$info"
echo "" echo ""
if [ "$head" = "Salomon Maintenance" ] || [ "$head" = "Anselm Maintenance" ]; then # Salomon Maintenance, Anselm Maintenance, Back in Production, Infrastructure Maintenance, PBS Maintenance, SCRATCH Maintenance, HOME Maintenance, Salomon and Anselm Maintenance
echo "add to table" if [ "$head" = "Salomon Maintenance" ] || [ "$head" = "Anselm Maintenance" ] || [ "$head" = "Back in Production" ] || [ "$head" = "Infrastructure Maintenance" ] || [ "$head" = "PBS Maintenance" ] || [ "$head" = "SCRATCH Maintenance" ] || [ "$head" = "HOME Maintenance" ] || [ "$head" = "Salomon and Anselm Maintenance" ]; then
dateDown=$(cat downtimes_history.md | sed -n '/---/{n;p;}' | cut -d "|" -f 2 | cut -d " " -f 1) dateDown=$(cat downtimes_history.md | sed -n '/---/{n;p;}' | cut -d "|" -f 2 | cut -d " " -f 1)
headDown=$(cat downtimes_history.md | sed -n '/---/{n;p;}' | cut -d "|" -f 3 | cut -d "*" -f 3) headDown=$(cat downtimes_history.md | sed -n '/---/{n;p;}' | cut -d "|" -f 3 | cut -d "*" -f 3)
echo "$dateDown ... $headDown"
if [ "$date" = "$dateDown" ] && [ "$head" = "$headDown" ]; then if [ "$date" = "$dateDown" ] && [ "$head" = "$headDown" ]; then
echo "stejne" echo "Everything up-to-date..."
else else
echo "jine" echo "Updating Downtime History..."
test="|$date|**$head** $info|" test="|$date|**$head** $info|"
sed '/---/a '"$test"'' downtimes_history.md > TMP.md sed '/---/a '"$test"'' downtimes_history.md > TMP.md
cat TMP.md > downtimes_history.md cat TMP.md > downtimes_history.md
rm TMP.md
fi fi
#echo "### $title" > MOTD.md #echo "### $title" > MOTD.md
#echo "**$head**" >> MOTD.md #echo "**$head**" >> MOTD.md
#echo "$date - $info" >> MOTD.md #echo "$date - $info" >> MOTD.md
else
echo "Downtime History not updated..."
fi fi
rm "$i"
rm TMP.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment