Skip to content

Commit

Permalink
Merge pull request bazelbuild#83 from mattmoor/fix-import-again
Browse files Browse the repository at this point in the history
Fix the right line this time.
  • Loading branch information
mattmoor authored Jun 30, 2017
2 parents a8d9911 + f9e82d3 commit 48a438c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker/incremental_load.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ RUNFILES="${PYTHON_RUNFILES:-${BASH_SOURCE[0]}.runfiles}"
DOCKER="${DOCKER:-docker}"

function list_diffids() {
for image in $("${DOCKER}" images -aq 2> /dev/null);
for image in $("${DOCKER}" images -aq 2> /dev/null);
do
for entry in $("${DOCKER}" inspect "${image}" -f '{{json .RootFS.Layers}}');
do
for entry in $("${DOCKER}" inspect "${image}" -f '{{json .RootFS.Layers}}');
do
echo -n $entry | python -mjson.tool | grep sha256 | cut -d'"' -f 2 | cut -d':' -f 2
done
echo -n $entry | python -mjson.tool | grep sha256 | cut -d'"' -f 2 | cut -d':' -f 2
done
done
}

# Fetch the diff ids of the layers loaded in the docker daemon already
Expand Down Expand Up @@ -117,7 +117,7 @@ function find_diffbase() {
done

TOTAL_DIFF_IDS=($(cat "${name}" | python -mjson.tool | \
grep sha256 | cut -d'"' -f 2 | cut -d':' -f 2))
grep -E '^ +"sha256:' | cut -d'"' -f 2 | cut -d':' -f 2))

LEGACY_COUNT=$((${#TOTAL_DIFF_IDS[@]} - ${#NEW_DIFF_IDS[@]}))
echo "${TOTAL_DIFF_IDS[@]:0:${LEGACY_COUNT}}"
Expand Down

0 comments on commit 48a438c

Please sign in to comment.