anchor.diff:          find image/$extractionID/layer -name ".wh.*" -exec bash -c 'name="$(basename {}|sed "s/^.wh.//")"; mknod "$(dirname {})/$name" c 0 0; rm {}' \;
   
           # Get the next lower directory and continue the loop.
  -        lowerdir=$lowerdir''${lowerdir:+:}image/$extractionID/layer
  +        lowerdir=image/$extractionID/layer''${lowerdir:+:}$lowerdir
         done
   
         mkdir work
  
positive.code:         # Use the temp folder we've been working on to create a new image.
          mv temp image/$layerID
  
          # Add the new layer ID to the beginning of the layer list
          (
            # originally this used `sed -i "1i$layerID" layer-list`, but
            # would fail if layer-list was completely empty.
            echo "$layerID/layer.tar"
            cat layer-list
          ) | ${pkgs.moreutils}/bin/sponge layer-list
  
          # Create image json and image manifest
          imageJson=$(cat ${baseJson} | jq ". + {\"rootfs\": {\"diff_ids\": [], \"type\": \"layers\"}}")
          manifestJson=$(jq -n "[{\"RepoTags\":[\"$imageName:$imageTag\"]}]")
  
          for layerTar in $(tac ./layer-list); do
            layerChecksum=$(sha256sum image/$layerTar | cut -d ' ' -f1)
            imageJson=$(echo "$imageJson" | jq ".history |= [{\"created\": \"$(jq -r .created ${baseJson})\"}] + .")
            imageJson=$(echo "$imageJson" | jq ".rootfs.diff_ids |= [\"sha256:$layerChecksum\"] + .")
            manifestJson=$(echo "$manifestJson" | jq ".[0].Layers |= [\"$layerTar\"] + .")
          done
  
          imageJsonChecksum=$(echo "$imageJson" | sha256sum | cut -d ' ' -f1)
  
negative.code:           layerID=$(sha256sum "$layer/json" | cut -d ' ' -f 1)
            ln -s "$layer" "./image/$layerID"
  
            manifestJson=$(echo "$manifestJson" | jq ".[0].Layers |= . + [\"$layerID/layer.tar\"]")
            imageJson=$(echo "$imageJson" | jq ".history |= . + [{\"created\": \"$(jq -r .created ${configJson})\"}]")
            imageJson=$(echo "$imageJson" | jq ".rootfs.diff_ids |= . + [\"sha256:$layerChecksum\"]")
          done
          imageJsonChecksum=$(echo "$imageJson" | sha256sum | cut -d ' ' -f1)
          echo "$imageJson" > "image/$imageJsonChecksum.json"
  