diff --git a/bin/slugify b/bin/slugify deleted file mode 100755 index 00bdcb4..0000000 --- a/bin/slugify +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -from slugify import slugify -import sys - -def main(args): - print slugify(' '.join(args)) - - return 0 - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/bin/update-gotools b/bin/update-gotools index eea0e8a..e8358ec 100755 --- a/bin/update-gotools +++ b/bin/update-gotools @@ -25,6 +25,8 @@ INSTALLS=( 'github.com/Luzifer/password' 'github.com/Luzifer/short_path' 'github.com/Luzifer/share' + 'github.com/Luzifer/slugify' + 'github.com/Luzifer/str2hex' ) diff --git a/bin/vault-gpg b/bin/vault-gpg index c6ba7b5..27edfe3 100755 --- a/bin/vault-gpg +++ b/bin/vault-gpg @@ -2,7 +2,7 @@ KEY=$1 -if [ -z "${KEY}" ] || ! (gpg2 --list-secret-keys | grep -q ${KEY}); then +if [ -z "${KEY}" ] || ! (gpg2 --list-secret-keys ${KEY}); then echo "No key given or no secret key found for '${KEY}'" exit 2 fi @@ -15,7 +15,7 @@ if [ -z "${PWD}" ]; then exit 2 fi -HEXPWD=$(python3 -c "import binascii; print(binascii.hexlify(bytearray('${PWD}', 'utf-8')))") +HEXPWD=$(echo -n "${PWD}" | str2hex) # Get keygrip of secret key for KEYGRIP in $(gpg2 --with-keygrip -k ${KEY} | grep Keygrip | cut -d '=' -f 2 | xargs); do