dot_testing/lappy/builds/utils/git-rbw-wrap

15 lines
282 B
Bash
Executable File

#!/bin/sh
[ -z "$1" ] && exit 1
# wrap rbw get $1 --full to output in the git credential helper
# format:
# username=yourusername
# password=yourpassword
rbw get $1 --full | \
sed '1{s/^/password=/}' | \
sed 's/Username: /username=/g' | \
grep -E 'username|password' | \
tac