# !/bin/sh [ "`whoami`" = root ] || exec sudo "$0""$@" if [ ! -x /usr/bin/axel ] thenecho"axel is not installed, perform this?(y/n)" read ops case$opsin y) if apt-get install axel -y --force-yes thenecho"axel installed" elseecho"unable to install the axel. you are using sudo?" ; exit fi ;; n) echo"not possible usage apt-fast" ; exit ;; esac fi ifecho"$@" | grep -q "upgrade\|install\|dist-upgrade"; then echo"Working..."; cd /var/cache/apt/archives/; apt-get -y --print-uris $@ | egrep -o -e "(ht|f)tp://[^\']+" > apt-fast.list && cat apt-fast.list | xargs -l1 axel -a 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