kolla/tools/update-build-links
Steven Dake 89edade6e5 Make update-build-links bashate compliant
Change-Id: I51841f90a1a291f6bc82372e048461afbb0b482b
Partially-Implements: blueprint bashate-gate
2015-06-07 12:17:59 -07:00

13 lines
362 B
Bash
Executable File

#!/bin/bash
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
find docker -name Dockerfile | while read dockerfile; do
dir=${dockerfile%/*}
link=$(python -c 'import os,sys; print os.path.relpath(sys.argv[1], sys.argv[2])' \
$PWD/tools/build-docker-image $dir)
ln -sf $link $dir/build
done