even better repo check (#156)

This commit is contained in:
Daniel Hansson 2017-03-05 20:48:00 +01:00 committed by GitHub
parent 53f3f15caa
commit f7fa5b727e
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ fi
# Check where the best mirrors are and update
echo
echo "Some VPS providers have local download mirrors preconfigured, some don't."
REPO=$(apt-cache policy | grep -m1 http| awk '{ print $2}')
REPO=$(apt-get update | grep -m 1 Hit | awk '{ print $2}')
echo -e "Your current server repository is: \e[36m$REPO\e[0m"
function ask_yes_or_no() {
read -p "$1 ([y]es or [N]o): "

View File

@ -188,7 +188,7 @@ apt install language-pack-en-base -y
sudo locale-gen "sv_SE.UTF-8" && sudo dpkg-reconfigure --frontend=noninteractive locales
# Check where the best mirrors are and update
REPO=$(apt-cache policy | grep -m1 http| awk '{ print $2}')
REPO=$(apt-get update | grep -m 1 Hit | awk '{ print $2}')
echo -e "Your server repository is:  \e[36m$REPO\e[0m"
function ask_yes_or_no() {
read -p "$1 ([y]es or [N]o): "