20 lines
360 B
Bash
Executable File
20 lines
360 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ -z "$1" ] && exit 1
|
|
|
|
# wrap rbw get $1 --full to output in the git credential helper
|
|
# format
|
|
|
|
# assume we're running xorg
|
|
prompt_for_rbw_password
|
|
|
|
# username=yourusername
|
|
# password=yourpassword
|
|
|
|
output=$(rbw get $1 --full)
|
|
echo "$output" | \
|
|
sed '1{s/^/password=/}' | \
|
|
sed 's/Username: /username=/g' | \
|
|
grep -E 'username|password' | \
|
|
tac
|