Allow skipping apt update
- environment variable TRAVIS_SKIP_APT_UPDATE can be set to non-empty to skip apt update when running travis2bash.sh
This commit is contained in:
parent
9efd0556e6
commit
d6a3989c7c
|
@ -65,8 +65,10 @@ function aptinstall() {
|
|||
# apt install
|
||||
# shellcheck disable=SC2154
|
||||
if [[ "$(declare -p travis_addons_apt_packages)" =~ "declare -a" ]]; then
|
||||
echo -e "\nsudo apt -y update\n"
|
||||
sudo apt -y update
|
||||
if [ -z "$TRAVIS_SKIP_APT_UPDATE" ]; then
|
||||
echo -e "\nsudo apt -y update\n"
|
||||
sudo apt -y update
|
||||
fi
|
||||
for ((i = 0; i < ${#travis_addons_apt_packages[@]}; i++))
|
||||
do
|
||||
echo -e "\napt-get -yq --no-install-suggests --no-install-recommends install ${travis_addons_apt_packages[$i]}\n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user