اینجا فروم سایر توزیعهای لینوکس هستش
ولی خوب واسه اوبونتو هم هست یکی. اونو من ننوشتم ولی خیلی از این کار من بهتر بود، فقط بدیش این بود که با axel کار میکرد من کردمش aria (اکسل آخر دانلود خیلی کند میشه) :
# !/bin/sh
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
# contact me at admin@mattparnell.com
# Special thanks to Travis/travisn000 from the PCLinux Forums for making improvements that allow
# for more complex apt-get commands. See the thread: http://www.pclinuxos.com/forum/index.php/topic,66385.0.html
# Use this just like apt-get for faster package downloading. Make sure to have axel installed.
#Some changes in this file made by fzerorubigd (http://cyberrabbits.net) to use aria2 instead of axel
function detect(){
type -P $1 > /dev/nul || { echo "Require $1 but not installed. Aborting." >&2; exit 1; }
}
# If the user entered arguments contain upgrade, install, or dist-upgrade
if echo "$@" | grep -q "upgrade\|install\|dist-upgrade"; then
echo "Working...";
detect "aria2c"
# Go into the directory apt-get normally puts downloaded packages
cd /var/cache/apt/archives/;
# Have apt-get print the information, including the URI's to the packages
# Strip out the URI's, and download the packages with Axel for speediness
# I found this regex elsewhere, showing how to manually strip package URI's you may need...thanks to whoever wrote it
apt-get -y --print-uris $@ | egrep -o -e "(ht|f)tp://[^\']+" > apt-fast.list
aria2c -i apt-fast.list
# Perform the user's requested action via apt-get
apt-get $@;
echo -e "\nDone! Verify that all packages were installed successfully. If errors are found, run apt-get clean as root and try again using apt-get directly.\n";
else
apt-get $@;
fi
اصل کد هم تو یادداشتهاش هست کجاست، فقط این تفاوتش با نسخه اصلی اینه که به جای axel از aria2c استفاده میکنه که من بیشتر باهاش راحتم و به نظر من خیلی بهتره.
اینو به اسم apt-fast.sh ذخیره کنید بعد اجراییش کنید به جای apt-get بزنید apt-fast.sh ، مثلا :
apt-fast.sh install testprogram