Skip to content

Instantly share code, notes, and snippets.

@waaaaargh
Last active August 29, 2015 14:04
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 waaaaargh/5a9bea109dab57434bd9 to your computer and use it in GitHub Desktop.
Save waaaaargh/5a9bea109dab57434bd9 to your computer and use it in GitHub Desktop.
Some tools to facilitate the creation of APT repositories
#!/bin/bash
# (c) 2014 by Johannes Fürmann
# Licensed under WTFPL. See http://www.wtfpl.net/txt/copying/
if [ $1 == "" ]; then
echo "depdl.sh"
echo "Download package and Dependencies"
echo ""
echo "USAGE:"
echo "depdl.sh PKGNAME"
else
old_IFS="$IFS"
IFS=$'\n'
# get package dependcies
raw_output=$(apt-cache depends $1 | grep Depends)
for line in $raw_output
do
pkgname=$(echo $line | sed "s/.*Depends: //g")
aptitude download $pkgname
done
aptitude download $1
fi
#!/bin/bash
# (c) 2014 by Johannes Fürmann
# Licensed under WTFPL. See http://www.wtfpl.net/txt/copying/
# you might want to change those values for your setup.
export GNUPGHOME=/tmp/keys
export KEYNAME=dpkg1
find .. -name '*.deb' -exec ln -s '{}' . \;
apt-ftparchive packages . > Packages
bzip2 -kf Packages
apt-ftparchive release . > Release
gpg --yes -abs -u $KEYNAME -o Release.gpg Release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment