From 1c168691c5ee72471fa4bfafd03caf2c89e11cce Mon Sep 17 00:00:00 2001 From: nopeitsnothing Date: Mon, 20 Apr 2026 03:04:39 -0400 Subject: [PATCH] Tweaking some of the build to function pt3 Signed-off-by: nopeitsnothing --- scripts/sign-pdfs.sh | 67 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/scripts/sign-pdfs.sh b/scripts/sign-pdfs.sh index 7811969..ab89777 100644 --- a/scripts/sign-pdfs.sh +++ b/scripts/sign-pdfs.sh @@ -32,44 +32,43 @@ print_error() { } # Check if required tools are available -check_dependencies() { - print_info "Checking dependencies..." +# check_dependencies() { +# print_info "Checking dependencies..." - for cmd in sha256sum b2sum gpg; do - if ! command -v "$cmd" &> /dev/null; then - print_error "$cmd is not installed. Please install it and try again." - exit 1 - fi - done +# for cmd in sha256sum b2sum; do +# if ! command -v "$cmd" &> /dev/null; then +# print_error "$cmd is not installed. Please install it and try again." +# exit 1 +# fi +# done - # Check GPG key availability - # if [ -z "$GPG_KEY_ID" ]; then - # GPG_KEY_ID="${SIGN_PDF_GPG_KEY:-}" - # fi +# # Check GPG key availability +# # if [ -z "$GPG_KEY_ID" ]; then +# # GPG_KEY_ID="${SIGN_PDF_GPG_KEY:-}" +# # fi - # if [ -n "$GPG_KEY_ID" ]; then - # if ! gpg --list-keys "$GPG_KEY_ID" &> /dev/null; then - # print_error "GPG key '$GPG_KEY_ID' not found in your keyring." - # exit 1 - # fi - # else - # # List available keys and prompt user - # print_warn "No GPG key ID specified. Listing available secret keys:" - # gpg --list-secret-keys --keyid-format LONG +# # if [ -n "$GPG_KEY_ID" ]; then +# # if ! gpg --list-keys "$GPG_KEY_ID" &> /dev/null; then +# # print_error "GPG key '$GPG_KEY_ID' not found in your keyring." +# # exit 1 +# # fi +# # else +# # # List available keys and prompt user +# # print_warn "No GPG key ID specified. Listing available secret keys:" +# # gpg --list-secret-keys --keyid-format LONG - # read -p "Enter the GPG key ID to use for signing (or press Enter to skip): " GPG_KEY_ID - # if [ -n "$GPG_KEY_ID" ]; then - # if ! gpg --list-keys "$GPG_KEY_ID" &> /dev/null; then - # print_error "GPG key '$GPG_KEY_ID' not found in your keyring." - # exit 1 - # fi - # else - # print_warn "No GPG signing will be performed. Set SIGN_PDF_GPG_KEY environment variable or pass key ID as argument." - # fi - # fi +# # read -p "Enter the GPG key ID to use for signing (or press Enter to skip): " GPG_KEY_ID +# # if [ -n "$GPG_KEY_ID" ]; then +# # if ! gpg --list-keys "$GPG_KEY_ID" &> /dev/null; then +# # print_error "GPG key '$GPG_KEY_ID' not found in your keyring." +# # exit 1 +# # fi +# # else +# # print_warn "No GPG signing will be performed. Set SIGN_PDF_GPG_KEY environment variable or pass key ID as argument." +# # fi - print_info "All dependencies checked successfully!" -} +# print_info "All dependencies checked successfully!" +# } # Create output directories setup_directories() { @@ -143,7 +142,7 @@ process_pdf() { # Main function main() { echo "" - check_dependencies + # check_dependencies setup_directories # Find all PDF files in input directory (recursively)