~apt-fast/apt-fast/apt-fast-ro

79.2.1 by Brenton Horne
Create quick-install.sh
1
#!/bin/bash
103 by Dominique Lasserre
quick-install.sh improvements, closes #112
2
set -e
3
4
apt_fast_installation() {
5
  if ! dpkg-query --show aria2 >/dev/null 2>&1; then
6
    sudo apt-get update
7
    sudo apt-get install -y aria2
8
  fi
9
10
  wget https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast -O /usr/local/sbin/apt-fast
11
  chmod +x /usr/local/sbin/apt-fast
12
  if ! [[ -f /etc/apt-fast.conf ]]; then
13
    wget https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast.conf -O /etc/apt-fast.conf
14
  fi
15
}
16
17
18
if [[ "$EUID" -eq 0 ]]; then
19
  apt_fast_installation
20
else
21
  type sudo >/dev/null 2>&1 || { echo "sudo not installed, change into root context" >&2; exit 1; }
22
23
  DECL="$(declare -f apt_fast_installation)"
24
  sudo bash -c "$DECL; apt_fast_installation"
79.2.1 by Brenton Horne
Create quick-install.sh
25
fi