We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0eea696 commit 998c63bCopy full SHA for 998c63b
1 file changed
okapi-hooks.sh
@@ -28,8 +28,9 @@ login() {
28
echo "No OKAPI_TOKEN; OKAPI_USER and OKAPI_PASS required"
29
exit 1
30
fi
31
- post -f -d"{\"username\":\"${OKAPI_USER}\",\"password\":\"${OKAPI_PASS}\"}" $U/authn/login
32
- OKAPI_TOKEN=`awk '/x-okapi-token/ {print $2}' <headers|tr -d '[:space:]'`
+ tmp=`mktemp`
+ post -f -D$tmp -d"{\"username\":\"${OKAPI_USER}\",\"password\":\"${OKAPI_PASS}\"}" $U/authn/login
33
+ OKAPI_TOKEN=`awk '/x-okapi-token/ {print $2}' < $tmp|tr -d '[:space:]'`
34
35
CURL_TOK="-HX-Okapi-Token:${OKAPI_TOKEN}"
36
}
0 commit comments