-
-
Save drewsberry/7b2a87b4b78864801386503e0b09d750 to your computer and use it in GitHub Desktop.
Use keybase command line utility to sign a file and detach the signature into a .sig file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
usage() { | |
echo "sign INPUT_FILE" | |
} | |
keybase_not_found() { | |
echo >&2 "Keybase command line utilities must be installed to sign files." | |
exit 1 | |
} | |
command -v keybase >/dev/null 2>&1 || keybase_not_found | |
input_file="$1" | |
if [ -z "$input_file" ]; then | |
usage "$0" | |
exit 1 | |
fi | |
keybase sign --detached --infile "$input_file" --outfile "${input_file}.sig" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment