#!/usr/bin/env bash # House Keeping _GIT_DIR="${HOME}/Dev/github/ilikenwf" mkdir -p "${_GIT_DIR}" cd "${_GIT_DIR}" # Initialization if [[ -d "${_GIT_DIR}/apt-fast" ]]; then echo "apt-fast is already installed!" echo "Updating apt-fast..." cd apt-fast git pull else echo "Installing apt-fast..." git clone --depth 1 https://github.com/ilikenwf/apt-fast cd apt-fast fi echo "Running build..." sudo cp apt-fast /usr/local/bin/ sudo chmod +x /usr/local/bin/apt-fast if [[ ! -f /etc/apt-fast.conf ]]; then sudo cp apt-fast.conf /etc fi echo "Installing dependencies..." sudo apt install -y aria2 echo "Setting up man page..." sudo cp ./man/apt-fast.8 /usr/share/man/man8 sudo gzip -f9 /usr/share/man/man8/apt-fast.8 sudo cp ./man/apt-fast.conf.5 /usr/share/man/man5 sudo gzip -f9 /usr/share/man/man5/apt-fast.conf.5 echo "Done!"