kolla/tools/update-build-links
Chen Zhiwei 76c1fe6371 Change the default shell to bash
Unify the shell to bash in all Kolla scripts.

Change-Id: Ib9591b2f8f344eb88455c5e9b7ecf2164fb5960a
Implements: blueprint use-bash-shell
2015-04-27 13:26:37 +08:00

13 lines
347 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