blob: c0a0bed13d7880e4de5bbf1e8ec245878171b10c [file] [log] [blame]
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +01001#! /usr/bin/env bash
Petr Ospalý03e61242019-01-03 16:54:50 +01002
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +01003# COPYRIGHT NOTICE STARTS HERE
4#
5# Copyright 2018 © Samsung Electronics Co., Ltd.
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19# COPYRIGHT NOTICE ENDS HERE
Petr Ospalý03e61242019-01-03 16:54:50 +010020
21
Tomáš Levora284fbf82019-04-23 14:28:47 +020022# Load common-functions library
23. $(dirname ${0})/../common-functions.sh
Petr Ospalý03e61242019-01-03 16:54:50 +010024
Tomáš Levora284fbf82019-04-23 14:28:47 +020025LIST_FILE="${1}"
26if [[ -z "$LIST_FILE" ]]; then
27 LIST_FILE="docker_image_list.txt"
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +010028fi
Petr Ospalý03e61242019-01-03 16:54:50 +010029
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +010030echo "Download all images"
Petr Ospalý03e61242019-01-03 16:54:50 +010031
Tomáš Levora284fbf82019-04-23 14:28:47 +020032lines=$(clean_list "$LIST_FILE" | wc -l)
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +010033line=1
Tomáš Levora284fbf82019-04-23 14:28:47 +020034for image in $(clean_list "$LIST_FILE"); do
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +010035 echo "== pkg #$line of $lines =="
Tomáš Levora284fbf82019-04-23 14:28:47 +020036 echo "$image"
37 retry docker -l error pull "$image"
Piotr Perzanowskie2ce4752018-12-18 13:18:15 +010038 line=$((line+1))
Tomáš Levora284fbf82019-04-23 14:28:47 +020039done