Skip to content

Commit f500615

Browse files
use while loop
1 parent 719e626 commit f500615

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

init-plain/usr/local/bin/entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ set -e
1111

1212
if [[ -z ${SKIP_ENTRYPOINTS} ]];then
1313
## /opt/entry/
14-
for x in $(find /opt/entry/ -type f -perm /u+x |sort);do
14+
while read -r x;do
1515
qecho "> execute entrypoint '${x}'"
1616
if [[ "$x" == *.env ]];then
1717
source ${x}
1818
else
1919
${x}
2020
fi
21-
done
21+
done <<< $(find /opt/entry/ -type f -perm /u+x |sort)
2222
if [[ "X${ENTRYPOINTS_DIR}" != "X" ]];then
2323
if [[ -d ${ENTRYPOINTS_DIR} ]];then
24-
for x in $(find ${ENTRYPOINTS_DIR} -type f -perm /u+x |sort);do
24+
while read -r x;do
2525
qecho "> execute entrypoint '${x}'"
2626
if [[ "$x" == *.env ]];then
2727
source ${x}
2828
else
2929
${x}
3030
fi
31-
done
31+
done <<< $(find ${ENTRYPOINTS_DIR} -type f -perm /u+x |sort)
3232
else
3333
echo "!!> Could not find specified ENTRYPOINTS_DIR '${ENTRYPOINTS_DIR}'"
3434
fi

0 commit comments

Comments
 (0)