--- /dev/null
+#!/bin/bash
+#
+# Adds a specified user & their key to the maintainer keyring on
+# ftp.gnu.org.
+#
+
+PACKAGES=/home/gatekpr/packages
+
+if ( ([ "$1" = "" ]) || ([ "$2" = "" ]) || ([ "$3" = "" ]) )
+then
+ echo "ftp-addkey.sh <project name> <maintainer email> <public key>"
+ exit
+fi
+
+if ! [ -d $PACKAGES/$1 ]
+then
+ echo "$1 is a new package. Creating a directory for it."
+ mkdir $PACKAGES/$1
+fi
+
+# Add email address to list of maintainers
+
+echo "Adding $2 to maintainer list."
+echo $2 >> $PACKAGES/$1/email
+
+# Import keys
+
+echo "Adding key..."
+
+pgpg $1 --import $3
+
+chmod -R 755 $PACKAGES/$1
+
+echo "Done."
+