Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b89d7dd8 authored by Felix's avatar Felix
Browse files

Trim whitespace from input

parent 022410c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ function generateEnvFile {
                    echo "$QUESTION"
                    if [[ "$PATTERN$INPUT_DIRECTION" = "$VALUE$VALUE" ]]
                    then
                        read INPUT < /dev/tty
                        read | awk '{$1=$1};1' | read INPUT
                    else
                        FIRST=1
                        while [[ $(echo "$INPUT" | grep -q -P "$PATTERN" && echo ok || echo nok) = "nok" ]]; do
@@ -63,7 +63,7 @@ function generateEnvFile {
                            else
                                FIRST=0
                            fi
                            read INPUT < /dev/tty
                            read | awk '{$1=$1};1' | read INPUT
                         :; done
                    fi
                    echo "$KEY=$INPUT" >> "$ENVFILE"