You've already forked dts-scripts
mirror of
https://github.com/Dasharo/dts-scripts.git
synced 2026-03-06 15:01:22 -08:00
get_dpp_creds: remove empty lines for creds
Credentials are wrapped in empty lines top and bottom. Remove them. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
This commit is contained in:
@@ -42,11 +42,6 @@ clear_line() {
|
||||
printf '\r\033[K'
|
||||
}
|
||||
|
||||
# Prints and empty line
|
||||
print_new_line() {
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Draws a simple progress bar
|
||||
# Example usage: draw_progress_bar "$((++TASK_NO))" "$TOTAL_TASKS"
|
||||
draw_progress_bar() {
|
||||
|
||||
@@ -108,10 +108,7 @@ clean_dpp_creds() {
|
||||
}
|
||||
|
||||
get_dpp_creds() {
|
||||
print_new_line
|
||||
|
||||
read -p "Enter DPP email: " DPP_EMAIL
|
||||
print_new_line
|
||||
if [[ -z "$DPP_EMAIL" ]]; then
|
||||
print_warning "Email cannot be empty, aborting."
|
||||
return 1
|
||||
@@ -122,7 +119,6 @@ get_dpp_creds() {
|
||||
fi
|
||||
|
||||
read -p "Enter password: " DPP_PASSWORD
|
||||
print_new_line
|
||||
if [[ -z "$DPP_PASSWORD" ]]; then
|
||||
print_warning "Password cannot be empty, aborting."
|
||||
return 1
|
||||
@@ -141,17 +137,6 @@ get_dpp_creds() {
|
||||
return 0
|
||||
}
|
||||
|
||||
login_to_dpp_server() {
|
||||
# Check if the user is already logged in, log in if not.
|
||||
if [ "$(mc alias ls "$DPP_SERVER_USER_ALIAS" --json | jq -r .accessKey)" = "null" ]; then
|
||||
if ! mc alias set $DPP_SERVER_USER_ALIAS $DPP_SERVER_ADDRESS $DPP_EMAIL $DPP_PASSWORD >/dev/null 2>>"$ERR_LOG_FILE"; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
login_to_dpp_server() {
|
||||
# Capture the access key
|
||||
local access_key
|
||||
|
||||
Reference in New Issue
Block a user