board-status: remove whitespace

Change-Id: I76ae5e294c157e73d07fd30cdb1c191d78efd5eb
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/6581
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Patrick Georgi 2014-08-10 19:06:45 +02:00
parent d668cceae0
commit 466ea0c3d3
1 changed files with 8 additions and 8 deletions

View File

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
# $1: file containing text # $1: file containing text
. ~/.wikiaccount . ~/.wikiaccount
WIKIAPI="http://www.coreboot.org/api.php" WIKIAPI="http://www.coreboot.org/api.php"
TITLE="Supported_Motherboards" TITLE="Supported_Motherboards"
cookie_jar="/tmp/wikicookiejar" cookie_jar="/tmp/wikicookiejar"
#Will store file in wikifile #Will store file in wikifile
#################login #################login
#Login part 1 #Login part 1
CR=$(curl -sS \ CR=$(curl -sS \
@ -23,14 +23,14 @@ CR=$(curl -sS \
--data-urlencode "lgname=${USERNAME}" \ --data-urlencode "lgname=${USERNAME}" \
--data-urlencode "lgpassword=${USERPASS}" \ --data-urlencode "lgpassword=${USERPASS}" \
--request "POST" "${WIKIAPI}?action=login&format=txt") --request "POST" "${WIKIAPI}?action=login&format=txt")
CR2=($CR) CR2=($CR)
if [ "${CR2[9]}" = "[token]" ]; then if [ "${CR2[9]}" = "[token]" ]; then
TOKEN=${CR2[11]} TOKEN=${CR2[11]}
else else
exit exit
fi fi
#Login part 2 #Login part 2
CR=$(curl -sS \ CR=$(curl -sS \
--location \ --location \
@ -45,7 +45,7 @@ CR=$(curl -sS \
--data-urlencode "lgpassword=${USERPASS}" \ --data-urlencode "lgpassword=${USERPASS}" \
--data-urlencode "lgtoken=${TOKEN}" \ --data-urlencode "lgtoken=${TOKEN}" \
--request "POST" "${WIKIAPI}?action=login&format=txt") --request "POST" "${WIKIAPI}?action=login&format=txt")
############### ###############
#Get edit token #Get edit token
CR=$(curl -sS \ CR=$(curl -sS \
@ -58,14 +58,14 @@ CR=$(curl -sS \
--header "Connection: keep-alive" \ --header "Connection: keep-alive" \
--compressed \ --compressed \
--request "POST" "${WIKIAPI}?action=tokens&format=txt") --request "POST" "${WIKIAPI}?action=tokens&format=txt")
CR2=($CR) CR2=($CR)
EDITTOKEN=${CR2[8]} EDITTOKEN=${CR2[8]}
if [ ${#EDITTOKEN} != 34 ]; then if [ ${#EDITTOKEN} != 34 ]; then
exit exit
fi fi
######################### #########################
CR=$(curl -sS \ CR=$(curl -sS \
--location \ --location \
--cookie $cookie_jar \ --cookie $cookie_jar \
@ -79,4 +79,4 @@ CR=$(curl -sS \
--form "title=${TITLE}" \ --form "title=${TITLE}" \
--form "text=<$1" \ --form "text=<$1" \
--request "POST" "${WIKIAPI}?action=edit&") --request "POST" "${WIKIAPI}?action=edit&")