Wednesday, 7 October 2009

Get cydia packages from a repository

Ok, not sure how useful this is, or how it will be taken by repo hosts, but, I find, especially when restoring, that having the packages on my computer is very useful!

Script, call it something like getcydia.sh, and run as follows:

getcydia.sh cydia.reponame.com foldertostoredebs

Script is here:

#--- START ---
REPO=${1}
FOLDER=${2}

mkdir ${FOLDER}
cd ${FOLDER}
wget -U "Telesphoreo APT-HTTP/1.0.98" ${REPO}/Packages.bz2
bunzip2 Packages.bz2
cat Packages | grep Filename | sed 's/Filename: //g' | awk -v REPO=${REPO} ' { print "wget -nc -U \"Telesphoreo APT-HTTP/1.0.98\" " REPO "/" $0 } ' | sh
#--- END ---

http://pastie.org/646073

1 comment:

Joseph said...

You are amazing! I just started my own repo, but ive had my site: http://theappshare.com for a while. Doing everything manually is a PITA, and this really helps. Thanks!