Install cbc-file in bin.

Allows it to be used as a system utility.
This commit is contained in:
Érico Rolim 2020-10-09 01:13:32 -03:00
parent 2075f4b4d2
commit cb41214e59
4 changed files with 4 additions and 5 deletions

View File

@ -36,7 +36,7 @@ $ encrypt-otp otp_accounts.json
## cbc-file
Hidden utility, does the encryption magic. Despite the name, uses
Mostly hidden utility, does the encryption magic. Despite the name, uses
[ChaCha20+Poly1305](https://tools.ietf.org/html/rfc7539) for encryption, as
implemented by [BearSSL](https://www.bearssl.org/), together with
[argon2](https://github.com/p-h-c/phc-winner-argon2) for key derivation.

View File

@ -7,7 +7,7 @@ if [ ! -e "$file" ]; then
exit 1
fi
if @PREFIX@/libexec/cbc-file lock "$file" > "$dest"; then
if @PREFIX@/bin/cbc-file lock "$file" > "$dest"; then
echo "'$dest' successfully generated!"
exit 0
else

View File

@ -1,6 +1,6 @@
#!/bin/sh
file="${OTP_ACCOUNTS:-$HOME/.local/share/otp_accounts}"
json="$(@PREFIX@/libexec/cbc-file unlock "$file")"
json="$(@PREFIX@/bin/cbc-file unlock "$file")"
[ -z "$json" ] && exit 1
label="$(printf %s "$json" |

View File

@ -14,8 +14,7 @@ encrypt-otp: encrypt-otp.in
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(PREFIX)/libexec
install -Dm755 cbc-file $(DESTDIR)$(PREFIX)/libexec/
install -Dm755 cbc-file $(DESTDIR)$(PREFIX)/bin/
install -Dm755 get-otp $(DESTDIR)$(PREFIX)/bin/
install -Dm755 encrypt-otp $(DESTDIR)$(PREFIX)/bin/