Skip to content

Instantly share code, notes, and snippets.

@kirushik
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirushik/9210152 to your computer and use it in GitHub Desktop.
Save kirushik/9210152 to your computer and use it in GitHub Desktop.
#!/bin/bash
REPO_ROOT=/srv/repo
PACKAGES_LOCATION=pool
METAINFO_LOCATION=$REPO_ROOT/dists/ubuntu/
RELEASE_FILE=$METAINFO_LOCATION/Release
PACKAGES_FILE=$METAINFO_LOCATION/testing/binary-amd64/Packages
cd $REPO_ROOT
dpkg-scanpackages -a amd64 $PACKAGES_LOCATION > $PACKAGES_FILE
gzip -c9 $PACKAGES_FILE > $PACKAGES_FILE.gz
bzip2 -c9 $PACKAGES_FILE > $PACKAGES_FILE.bz2
echo "Archive: ubuntu" > $RELEASE_FILE
echo "Suite: ubuntu" >> $RELEASE_FILE
echo "Components: testing" >> $RELEASE_FILE
echo "Origin: ddc-llc.com" >> $RELEASE_FILE
echo "Label: DDC LLC Ubuntu repository" >> $RELEASE_FILE
echo "Architectures: amd64" >> $RELEASE_FILE
echo "Description: IndoorTV client and stuff" >> $RELEASE_FILE
apt-ftparchive release $METAINFO_LOCATION >> $RELEASE_FILE
rm $RELEASE_FILE.gpg
gpg -abs -o $RELEASE_FILE.gpg $RELEASE_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment