diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2018-06-08 18:10:58 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-06-14 08:45:24 +0000 |
commit | 79d26c7a83fd2b14cc9a787e7820824931336d85 (patch) | |
tree | ce9a6d941787f4f52e8b4110a4b077e357938a32 /util/board_status/to-wiki/push-to-wiki.sh | |
parent | 31e0d42a1de4605b5c5e89310643a5e8bbee4be5 (diff) |
util/docker/coreboot.org-status: collect report generators
Move generators for the board status report and the kconfig options
report into a common directory and wrap them in a docker container.
Also rework to emit HTML not wiki syntax.
Change-Id: If42e1dd312c5fa4e32f519865e3b551bc471bc72
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/26977
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/board_status/to-wiki/push-to-wiki.sh')
-rwxr-xr-x | util/board_status/to-wiki/push-to-wiki.sh | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/util/board_status/to-wiki/push-to-wiki.sh b/util/board_status/to-wiki/push-to-wiki.sh deleted file mode 100755 index 6ad3c4a3f8..0000000000 --- a/util/board_status/to-wiki/push-to-wiki.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -# $1: file containing text -# $2: wiki page to update - -. ~/.wikiaccount -WIKIAPI="https://www.coreboot.org/api.php" -TITLE="$2" -cookie_jar="$HOME/.wikicookiejar" -#Will store file in wikifile - -#################login -#Login part 1 -CR=$(curl -sS \ - --location \ - --retry 2 \ - --retry-delay 5\ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --compressed \ - --data-urlencode "lgname=${USERNAME}" \ - --data-urlencode "lgpassword=${USERPASS}" \ - --request "POST" "${WIKIAPI}?action=login&format=json") - -TOKEN=`echo $CR| sed -e 's,^.*"token":"\([^"]*\)".*$,\1,'` -if [ -z "$TOKEN" ]; then - exit -fi - -#Login part 2 -CR=$(curl -sS \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --compressed \ - --data-urlencode "lgname=${USERNAME}" \ - --data-urlencode "lgpassword=${USERPASS}" \ - --data-urlencode "lgtoken=${TOKEN}" \ - --request "POST" "${WIKIAPI}?action=login&format=json") - -############### -#Get edit token -CR=$(curl -sS \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --compressed \ - --request "POST" "${WIKIAPI}?action=query&meta=tokens&format=json") - -EDITTOKEN=`echo $CR| sed -e 's,^.*"csrftoken":"\([^"]*\)".*$,\1,'` -EDITTOKEN=`printf "$EDITTOKEN"` -if [ ${#EDITTOKEN} != 34 ]; then - exit -fi -######################### - -CR=$(curl -sS \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --header "Expect:" \ - --form "token=${EDITTOKEN}" \ - --form "title=${TITLE}" \ - --form "text=<$1" \ - --request "POST" "${WIKIAPI}?action=edit&") |