Created
November 11, 2017 02:18
-
-
Save shvchk/bc4c97a2f61a2f54430b450928c85a16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sh | |
DEFAULT_DL_LIMIT="32" # KB/s | |
APT_LAST_UPDATE_FILE="$HOME/.apt-last-update" | |
NICE="nice -n 19 ionice -c 3 trickle -s -d ${1:-$DEFAULT_DL_LIMIT}" | |
sudo $NICE apt update | |
touch $APT_LAST_UPDATE_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment