Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Last active August 29, 2015 14:02
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 voyeg3r/4e0a11cd264377b3c34e to your computer and use it in GitHub Desktop.
Save voyeg3r/4e0a11cd264377b3c34e to your computer and use it in GitHub Desktop.
#!/bin/bash
# Arquivo: installaptfast.sh
# Criado: Qui 12/Jun/2014 hs 10:23
# Last Change: Qui 12/Jun/2014 hs 10:23
# autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
# twitter: http://www.twitter.com/voyeg3r
# email: voyeg3r  gmail.com
# references: https://github.com/ilikenwf/apt-fast
# this script aims to install apt-fast in ubuntu 14.04 manually, take in acount
# that the deb version not was released yet
# are your rootw
if [ "$(id -u)" != "0" ]; then
echo " Need be root"
sleep 2
exit 1
fi
if ! which apt-fast >/dev/null; then
# https://github.com/ilikenwf/apt-fast
# aria2
command -v aria2c || sudo apt-get -y install aria2
# the script itself
wget -c https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast -O /usr/bin/apt-fast && chmod 0755 $_
wget -c https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast.conf -O /etc/apt-fast.conf
# don't make questions
sed -i 's/#DOWNLOADBEFORE=true/DOWNLOADBEFORE=false/g' /etc/apt-fast.conf
# zsh completions
wget -c https://raw.githubusercontent.com/ilikenwf/apt-fast/master/completions/zsh/_apt-fast -O /usr/share/zsh/functions/Completion/Debian/_apt-fast
chown root:root /usr/share/zsh/functions/Completion/Debian/_apt-fast
source /usr/share/zsh/functions/Completion/Debian/_apt-fast
# bash completions
wget -c https://raw.githubusercontent.com/ilikenwf/apt-fast/master/completions/bash/apt-fast -O /etc/bash_completion.d/apt-fast
chown root:root /etc/bash_completion.d/apt-fast
#. /etc/bash_completion
# man pages
wget -c https://raw.githubusercontent.com/ilikenwf/apt-fast/master/man/apt-fast.8 -O /usr/share/man/man8/apt-fast.8
gzip -f9 /usr/share/man/man8/apt-fast.8
wget -c https://raw.githubusercontent.com/ilikenwf/apt-fast/master/man/apt-fast.conf.5 -O /usr/share/man/man5/apt-fast.conf.5
gzip -f9 /usr/share/man/man5/apt-fast.conf.5
# update and upgrade
apt-fast update && apt-fast upgrade
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment