3 # COPYRIGHT NOTICE STARTS HERE
5 # Copyright 2018 © Samsung Electronics Co., Ltd.
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 # COPYRIGHT NOTICE ENDS HERE
23 RELATIVE_PATH=../ # relative path from this script to 'common-functions.sh'
24 if [ "$IS_COMMON_FUNCTIONS_SOURCED" != YES ] ; then
25 SCRIPT_DIR=$(dirname "${0}")
26 LOCAL_PATH=$(readlink -f "$SCRIPT_DIR")
27 . "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh
31 if [[ -z "$SRC_IMAGE_LIST" ]]; then
32 SRC_IMAGE_LIST="docker_image_list.txt"
35 echo "Download all images"
37 lines=$(cat $SRC_IMAGE_LIST | wc -l)
39 while read -r image; do
40 echo "== pkg #$line of $lines =="
42 name=$(echo $image|awk '{print $1}')
43 digest=$(echo $image|awk '{print $2}')
45 echo "$name digest:$digest"
46 if [[ "$digest" == "<none>" ]]; then
47 retry docker -l error pull "$name"
49 retry docker -l error pull "$name"
53 done < "$SRC_IMAGE_LIST"