Case insensitive LOGIN_KEY match

This commit is contained in:
Claudio Maradonna 2021-06-04 20:08:06 +02:00
parent 82557b7196
commit bc623b0a1b
Signed by: claudiomaradonna
GPG key ID: B1EDCB4C3B05C387

View file

@ -32,7 +32,7 @@ if [[ -f "$FINAL_FILE_NAME" ]]; then
PASSWORD=$($PASS_EXECUTABLE show "$GPG_FILE_NAME" | head -n1)
LOGIN_KEY=$($PASS_EXECUTABLE show "$GPG_FILE_NAME" | awk '/^login:|ID:|email:|user:/ {ORS=" ";for(i=2; i<=NF; i++) print $i; exit;}')
LOGIN_KEY=$($PASS_EXECUTABLE show "$GPG_FILE_NAME" | awk 'BEGIN{IGNORECASE=1} /^login:|ID:|email:|user:/ {ORS=" ";for(i=2; i<=NF; i++) print $i; exit;}')
GPG_FILE_NAME=${GPG_FILE_NAME//\// > }
echo "Processing $GPG_FILE_NAME";