Skip to content

Instantly share code, notes, and snippets.

@harish2704
Last active September 3, 2016 05:21
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 harish2704/bd13ca6b9438d5d39acc4fee1d85e833 to your computer and use it in GitHub Desktop.
Save harish2704/bd13ca6b9438d5d39acc4fee1d85e833 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
codeName='xenial'
component='main'
arch='amd64'
dirname="dists/$codeName/$component/binary-$arch"
mkdir -p $dirname
cat<<EOF > $dirname/Release
Archive: $codeName
Version: 16.04
Component: $component
Origin: Ubuntu
Label: Ubuntu
Architecture: $arch
EOF
dpkg-scanpackages pool | tee $dirname/Packages | gzip -9c > $dirname/Packages.gz
arch='i386'
dirname="dists/$codeName/$component/binary-$arch"
mkdir -p $dirname
touch $dirname/Packages
cd dists/$codeName;
apt-ftparchive release ./ > Release;
gpg --clearsign --digest-algo sha256 -o InRelease Release
gpg -abs -o Release.gpg Release
cd ../../
# Export the key only in initial running
# gpg --output keyFile --armor --export C620EFE0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment