#!/bin/bash

read -s -p "GPG Passphrase: " passphrase

for file in "$@"
do
  (
    echo "version: 1.1"
    echo "directory: gnuradio"
    echo "filename: $file"
  )> $file.directive
  echo "$passphrase" | gpg --passphrase-fd 0 --clearsign $file.directive
  rm $file.directive
  echo "$passphrase" | gpg --passphrase-fd 0 -b $file
done
passphrase="XYZabcdefhghakdsj;lasjdf;ajfdiuiwjr;lajv;laoisfuaoieurlkajdsflkajsdfoiuew"