Skip to content

Commit fe22ad9

Browse files
committed
Change runChecks() out to be cleaner.
1 parent c9fb4fc commit fe22ad9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/entrypoint.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ guessUrl(){
106106

107107
echo "${url}"
108108
}
109+
109110
runChecks() {
110111
local pass=true
111112
local url
@@ -120,9 +121,9 @@ runChecks() {
120121
"$(tput setaf 7)$(tput setab 2)" \
121122
"$(tput sgr 0)"
122123

123-
echo "Contents of volume /var/www/www/api/data:"
124-
find /var/www/www/api/data -maxdepth 1 -type d -exec echo -e "\t{}/" \;
125-
find /var/www/www/api/data -maxdepth 1 -type f -exec echo -e "\t{}" \;
124+
printf "Contents of volume /var/www/www/api/data:\n%s\n%s\n\n" \
125+
"$(find /var/www/www/api/data -maxdepth 1 -type d -exec echo -e "\t{}/" \; | sort)" \
126+
"$(find /var/www/www/api/data -maxdepth 1 -type f -exec echo -e "\t{}" \; | sort)"
126127

127128
url="$(guessUrl)"
128129
readonly url

0 commit comments

Comments
 (0)