Allow skipping apt update

- environment variable TRAVIS_SKIP_APT_UPDATE can be set to non-empty to
  skip apt update when running travis2bash.sh
pull/1/head
Peter Šurda 2 years ago
parent 9efd0556e6
commit d6a3989c7c
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
  1. 6
      travis2bash.sh

@ -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…
Cancel
Save