Last active
August 29, 2015 14:04
-
-
Save waaaaargh/5a9bea109dab57434bd9 to your computer and use it in GitHub Desktop.
Some tools to facilitate the creation of APT repositories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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