AptlyOnDemand/aptly.sh

25 lines
619 B
Bash
Executable File

#!/bin/bash
cat >keyparms <<EOF
%echo Generating a basic OpenPGP key
Key-Type: DSA
Key-Length: 1024
Subkey-Type: ELG-E
Subkey-Length: 1024
Name-Real: $USER_NAME
Name-Comment: dev deb repo
Name-Email: $USER_EMAIL
Expire-Date: 0
Passphrase: $PASSPHRASE
%commit
%echo done
EOF
export PINENTRY_USER_DATA="USE_CURSES=1"
gpg --gen-key --batch keyparms
gpg --export --armor > /signing-key/dev.pubkey
aptly repo create --component="main" --distribution="ubuntu" dev
aptly repo add dev /packages
aptly publish repo --batch --passphrase="$PASSPHRASE" dev
aptly serve