backblaze-b2: Fix autocompletion support

backblaze v1.3.6 incorporates[1] a fix[2] for autocompletion that replaced
`have` function with `_have`. The postInstall hook therefore needs
to be updated to replace `_have`.

[1] https://github.com/Backblaze/B2_Command_Line_Tool#136-august-21-2018
[2] https://github.com/Backblaze/B2_Command_Line_Tool/pull/497
This commit is contained in:
Urban Skudnik 2018-09-03 20:57:32 +02:00 committed by Domen Kožar
parent 059c0ac6eb
commit 882f6c96d2

View File

@ -33,7 +33,7 @@ buildPythonApplication rec {
postInstall = ''
mv "$out/bin/b2" "$out/bin/backblaze-b2"
sed 's/^have b2 \&\&$/_have backblaze-b2 \&\&/' -i contrib/bash_completion/b2
sed 's/^_have b2 \&\&$/_have backblaze-b2 \&\&/' -i contrib/bash_completion/b2
sed 's/^\(complete -F _b2\) b2/\1 backblaze-b2/' -i contrib/bash_completion/b2
mkdir -p "$out/etc/bash_completion.d"