while[-h"$SOURCE"];do# resolve $SOURCE until the file is no longer a symlink
services:
DIR="$( cd -P "$(dirname"$SOURCE")" && pwd )"
-docker:stable-dind
SOURCE="$(readlink "$SOURCE")"
script:
[[$SOURCE!=/*]]&&SOURCE="$DIR/$SOURCE"# if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located