Fiddle with gpg

This commit is contained in:
Starbeamrainbowlabs 2019-08-06 00:33:58 +01:00
parent 3b2fd9313f
commit ea21f61d83
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -2,7 +2,7 @@
# Make sure the current directory is the location of this script to simplify matters
cd "$(dirname "$(readlink -f "$0")")" || exit 2;
export GNUPGHOME="${PWD}";
export GNUPGHOME="${PWD}/gnupg";
################
### Settings ###
@ -74,7 +74,7 @@ task_setup() {
fi
task_end $?;
if [ ! -e "$GNUPGHOME/secring.gpg" ]; then
if [ ! -e "${GNUPGHOME}" ]; then
if [ ! -f "./secret.gpg" ]; then
echo "Couldn't find the secret key to use.";
echo "Make sure ${HC}secret.gpg${RS} exists on disk.";
@ -87,15 +87,16 @@ task_setup() {
task_end $?;
fi
task_begin "Creating directories";
mkdir "${dir_sources}" "${dir_repo}";
task_end $?;
if [ ! -f "${repo_dir}/aptosaurus.asc" ]; then
task_begin "Hard linking public signing key";
cp -al "./public.gpg" "${dir_repo}/aptosaurus.asc";
task_end $?;
fi
task_begin "Creating directories";
mkdir "${dir_sources}" "${dir_repo}";
task_end $?;
}
# $1 - the .deb file to symlink