#!/bin/sh -u # # A short script to set up aliases (i.e., hard-links) as `pgp' filter names. # # Note that the possibly unadorned filter name `pgp' is actually included # in the set of filter names below -- this should probably be one of: # 1) a (symbolic) link to /bin/pgp (or wherever the real `pgp' resides); # 2) an (executable) script in ~/bin (which invokes the real `pgp'); or # 3) an (executable) program in ~/bin ( ... ditto ... ). # Note that some systems have problems `exec'ing a script or can't/won't # pass the original "program name" to a script that is pointed to by a # symbolic link (at least under some conditions); in such cases you may # have to resort to (3) even if you would rather just have (2). # # In any case, the following script assumes that you have already set up # something as ~/bin/pgp ... # # Note: For the conceptually-challenged, please observe that creating links # with "interesting" names does NOT create the indicated functionality; # these names must be associated with the appropriate commands, programs, # and/or scripts before anything interesting and useful will happen! # Note: For the shell-challenged, the following is offered as a way of setting # up all of those names for the `pine' filters: # cd $HOME/bin # [Make private links in ~/bin] # # Something like the following is assumed to have already been done ... # ln -s /usr/uucc/exec/pgp pgp # [... or wherever `pgp' might reside] # or # cp /home/lneide/bin/pgp pgp # [... script to invoke `pgp' and wait] # chmod u+rx pgp # to set up something as ~/bin/pgp that hard-links can be attached to ... # ln pgp pgp-decrypt # For " ... PGP MESSAGE ... " ln pgp pgp-verify # " ... PGP SIGNED MESSAGE ... " ln pgp pgp-glean # " ... PGP PUBLIC KEY BLOCK ... " # ln pgp pgp-sign # `pgp -u $USER -fast` ln pgp pgp-armor # `pgp -fa` ln pgp pgp-armor-and-sign # `pgp -u $USER -fas` ln pgp pgp-encrypt # `pgp -u $USER -feat ... ` ln pgp pgp-encrypt-and-sign # `pgp -u $USER -feast ... ` ln pgp pgp-encrypt-to-view # `pgp -u $USER -mfeat ... ` ln pgp pgp-encrypt-to-view-and-sign # `pgp -u $USER -mfeast ... ` ln pgp pgp-sign-as-root # `pgp -u root -fast` ln pgp pgp-armor-and-sign-as-root # `pgp -u root -fas` ln pgp pgp-encrypt-and-sign-as-root # `pgp -u root -feast ... ` ln pgp pgp-encrypt-to-view-and-sign-as-root #-u root -mfeast ... ln pgp pgp-sign-as-ph # `pgp -u ph -fast` ln pgp pgp-armor-and-sign-as-ph # `pgp -u ph -fas` ln pgp pgp-encrypt-and-sign-as-ph # `pgp -u ph -feast ... ` ln pgp pgp-encrypt-to-view-and-sign-as-ph #-u ph -mfeast ... # ln pgp pgp-encrypt-by-phrase-to-view-and-sign-as-ph # -mfacts ln pgp pgp-encrypt-by-phrase-and-sign-as-ph #-u ph -facts ln pgp pgp-encrypt-by-phrase-to-view-and-sign-as-root # -mfacts ln pgp pgp-encrypt-by-phrase-and-sign-as-root #-u root -facts ln pgp pgp-encrypt-by-phrase-to-view-and-sign #-u $USER -mfacts ln pgp pgp-encrypt-by-phrase-and-sign # `pgp -u $USER -facts` ln pgp pgp-encrypt-by-phrase-to-view # `pgp -mfact` ln pgp pgp-encrypt-by-phrase # `pgp -fact` # # Yes, "hard" links to a "soft" link work perfectly well, and they're # quite efficient. Thanks for noticing ... # Note: The filter names above of the form "...-as-root" and "...-as-ph" # simply represent a way of selecting one of many signing keys for us # schizophrenics with multiple identities! If you also have multiple # identities (i.e., secret signing keys), change the names of these # filters to accomodate your personal situation (you will also need to # change the associated "-u " filter arguments appropriately). # Otherwise, just delete all of the above "...-as-..." filters.