23 lines
389 B
Bash
Executable File
23 lines
389 B
Bash
Executable File
#!/bin/bash
|
|
|
|
WEB=$1
|
|
TMP=.status.tmp
|
|
|
|
wget -qO $TMP $WEB
|
|
|
|
STATUS=$(grep "Termination Status" $TMP | perl -pe "s/.*\<dd\>(.+)\<.*/\1/"
|
|
)
|
|
REV=$(grep "Updating " $TMP | grep -Eo "[[:alnum:]]{7}\.\.[[:alnum:]]{7}")
|
|
|
|
if [ "$STATUS" == "Success" ]; then
|
|
STATUS="fin"
|
|
elif [ "$STATUS" == "running..." ]; then
|
|
STATUS="run"
|
|
fi
|
|
|
|
if [ "$REV" = "" ]; then
|
|
REV="(uncond)"
|
|
fi
|
|
|
|
echo "$STATUS;r$REV"
|