File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,13 +57,25 @@ defaultCommand() {
5757}
5858
5959entrypoint () {
60- local -r subject=" ${1-} "
60+ local url subject
61+ readonly subject=" ${1-} "
6162
6263 # If the first argument is a command that exists, run it
6364 if [ -n " ${subject} " ] && [ -n " $( command -v " ${subject} " 2> /dev/null) " ]; then
6465 exec " ${@ } "
6566 else
6667 runChecks
68+
69+ if [ -d /var/www/html/assets ]; then
70+ url=" $( guessUrl) "
71+ readonly url
72+
73+ printf " An assets folder has been found and is available at %s\nAvailable assets:\n%s\n%s\n\n" \
74+ " $( tput setaf 7) ${url} /assets/$( tput sgr 0) " \
75+ " $( find /var/www/html/assets -maxdepth 1 -type d -exec echo -e " \t{}/" \; | sort) " \
76+ " $( find /var/www/html/assets -maxdepth 1 -type f -exec echo -e " \t{}" \; | sort) "
77+ fi
78+
6779 defaultCommand " ${@ } "
6880 fi
6981}
You can’t perform that action at this time.
0 commit comments