mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 18:44:14 +00:00
make sure input line is set before doing things
This commit is contained in:
parent
b64b21054e
commit
141a327627
@ -7,7 +7,10 @@ function error_handler() {
|
|||||||
trap 'error_handler ${LINENO} $?' ERR
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
set -o errtrace -o errexit -o nounset -o pipefail
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
script_dir="$(
|
||||||
|
cd -- "$(dirname "$0")" >/dev/null 2>&1
|
||||||
|
pwd -P
|
||||||
|
)"
|
||||||
|
|
||||||
if [[ -z "${KEYCLOAK_BASE_URL:-}" ]]; then
|
if [[ -z "${KEYCLOAK_BASE_URL:-}" ]]; then
|
||||||
export KEYCLOAK_BASE_URL=http://localhost:7002
|
export KEYCLOAK_BASE_URL=http://localhost:7002
|
||||||
@ -24,9 +27,11 @@ fi
|
|||||||
export REALM_NAME=${2-spiffworkflow}
|
export REALM_NAME=${2-spiffworkflow}
|
||||||
|
|
||||||
while read -r input_line; do
|
while read -r input_line; do
|
||||||
|
if [[ -n "$input_line" ]]; then
|
||||||
if ! grep -qE '(^#|email)' <<<"$input_line"; then
|
if ! grep -qE '(^#|email)' <<<"$input_line"; then
|
||||||
username=$(awk -F '@' '{print $1}' <<<"$input_line")
|
username=$(awk -F '@' '{print $1}' <<<"$input_line")
|
||||||
password=$(awk -F ',' '{print $2}' <<<"$input_line")
|
password=$(awk -F ',' '{print $2}' <<<"$input_line")
|
||||||
"${script_dir}/login_with_user" "$username" "$password"
|
"${script_dir}/login_with_user" "$username" "$password"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done <"$user_list"
|
done <"$user_list"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user