AptlyOnDemand/aptly.sh

25 lines
616 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: Benjamin Bohard
Name-Comment: dev deb repo
Name-Email: bbohard@cadoles.com
Expire-Date: 0
Passphrase: abc
%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="abc" dev
aptly serve