File tree Expand file tree Collapse file tree 4 files changed +44
-4
lines changed
Expand file tree Collapse file tree 4 files changed +44
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ docker_process_init_files() {
5858 local f
5959 for f; do
6060 case " $f " in
61- * .sh) mysql_note " $0 : running $f " ; . " $f " ;;
61+ * .sh)
62+ # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
63+ # https://github.com/docker-library/postgres/pull/452
64+ if [ -x " $f " ]; then
65+ mysql_note " $0 : running $f "
66+ " $f "
67+ else
68+ mysql_note " $0 : sourcing $f "
69+ . " $f "
70+ fi
71+ ;;
6272 * .sql) mysql_note " $0 : running $f " ; docker_process_sql < " $f " ; echo ;;
6373 * .sql.gz) mysql_note " $0 : running $f " ; gunzip -c " $f " | docker_process_sql; echo ;;
6474 * .sql.xz) mysql_note " $0 : running $f " ; xzcat " $f " | docker_process_sql; echo ;;
Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ docker_process_init_files() {
5858 local f
5959 for f; do
6060 case " $f " in
61- * .sh) mysql_note " $0 : running $f " ; . " $f " ;;
61+ * .sh)
62+ # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
63+ # https://github.com/docker-library/postgres/pull/452
64+ if [ -x " $f " ]; then
65+ mysql_note " $0 : running $f "
66+ " $f "
67+ else
68+ mysql_note " $0 : sourcing $f "
69+ . " $f "
70+ fi
71+ ;;
6272 * .sql) mysql_note " $0 : running $f " ; docker_process_sql < " $f " ; echo ;;
6373 * .sql.gz) mysql_note " $0 : running $f " ; gunzip -c " $f " | docker_process_sql; echo ;;
6474 * .sql.xz) mysql_note " $0 : running $f " ; xzcat " $f " | docker_process_sql; echo ;;
Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ docker_process_init_files() {
5858 local f
5959 for f; do
6060 case " $f " in
61- * .sh) mysql_note " $0 : running $f " ; . " $f " ;;
61+ * .sh)
62+ # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
63+ # https://github.com/docker-library/postgres/pull/452
64+ if [ -x " $f " ]; then
65+ mysql_note " $0 : running $f "
66+ " $f "
67+ else
68+ mysql_note " $0 : sourcing $f "
69+ . " $f "
70+ fi
71+ ;;
6272 * .sql) mysql_note " $0 : running $f " ; docker_process_sql < " $f " ; echo ;;
6373 * .sql.gz) mysql_note " $0 : running $f " ; gunzip -c " $f " | docker_process_sql; echo ;;
6474 * .sql.xz) mysql_note " $0 : running $f " ; xzcat " $f " | docker_process_sql; echo ;;
Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ docker_process_init_files() {
5858 local f
5959 for f; do
6060 case " $f " in
61- * .sh) mysql_note " $0 : running $f " ; . " $f " ;;
61+ * .sh)
62+ # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
63+ # https://github.com/docker-library/postgres/pull/452
64+ if [ -x " $f " ]; then
65+ mysql_note " $0 : running $f "
66+ " $f "
67+ else
68+ mysql_note " $0 : sourcing $f "
69+ . " $f "
70+ fi
71+ ;;
6272 * .sql) mysql_note " $0 : running $f " ; docker_process_sql < " $f " ; echo ;;
6373 * .sql.gz) mysql_note " $0 : running $f " ; gunzip -c " $f " | docker_process_sql; echo ;;
6474 * .sql.xz) mysql_note " $0 : running $f " ; xzcat " $f " | docker_process_sql; echo ;;
You can’t perform that action at this time.
0 commit comments