dot_testing/builds/utils/rbw-git-handler

20 lines
351 B
Plaintext
Raw Normal View History

2024-07-22 15:36:37 -05:00
#!/bin/sh
[ -z "$1" ] && exit 1
# wrap rbw get $1 --full to output in the git credential helper
# format
2024-07-24 13:20:24 -05:00
# assume we're running xorg
2024-12-25 07:29:11 -06:00
rbw-x11-prompt
2024-07-24 13:20:24 -05:00
2024-07-22 15:36:37 -05:00
# 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