mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-24 15:06:41 +00:00
39 lines
1021 B
Bash
Executable File
39 lines
1021 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
|
COMPOSEPATH="${SCRIPTPATH}/../../"
|
|
CONTAINER="$( cd "${COMPOSEPATH}" && docker-compose ps -q php )"
|
|
|
|
#FILES="$()"
|
|
cd "${COMPOSEPATH}" && docker-compose exec -T php bash -c "find /startup.2.d/*.sh-example -type f -print0 2>/dev/null" \
|
|
| xargs -0 -n 1 echo \
|
|
| while read f; do
|
|
|
|
echo "# ----------------------------------------------------------------------------------------"
|
|
echo "# [TEST] ${f}"
|
|
echo "# ----------------------------------------------------------------------------------------"
|
|
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
|
sleep 5
|
|
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
|
sleep 5
|
|
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
|
sleep 5
|
|
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
|
sleep 5
|
|
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
|
echo "[FAIl] ${f}"
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
echo "[OK] ${f}"
|
|
echo
|
|
echo
|
|
done
|