File tree Expand file tree Collapse file tree 4 files changed +20
-14
lines changed
Expand file tree Collapse file tree 4 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ RESET=" \033[0m"
4+ BOLD=" \033[1m"
5+ GOLD=" \033[33m"
6+
37if [[ " $1 " == init ]]; then
4- /usr/local/bin/wp-init.sh
5- /usr/local/bin/permissions.sh
6- /usr/local/bin/getting-started.sh
8+ OWNER_GROUP=$( stat -c " %u:%g" /usr/src/site)
9+ . /usr/local/bin/wp-init.sh
10+ . /usr/local/bin/permissions.sh
11+ . /usr/local/bin/getting-started.sh
712 exit 0
813fi
914
1015# TODO: Remove once we're certain it's unused
1116# This was never called. docker-compose files replace the entrypoint instead
1217if [[ " $1 " == permissions ]]; then
13- echo " DEPRECATED: Replace the entrypoint with /usr/local/bin/permissions"
14- echo " or call from docker-compose."
18+ echo " ${GOLD} DEPRECATED: Replace the entrypoint with /usr/local/bin/permissions${RESET} "
19+ echo " ${GOLD} or call from docker-compose. (docker-entrypoint.sh) ${RESET} "
1520 /usr/local/bin/permissions.sh
1621 exit 0
1722fi
Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ if [[ -z $OWNER_GROUP ]]; then
2424 # be root, but on Linux it will match the active host user.
2525
2626 echo -e " ${GOLD} DEPRECATED: ${BOLD} \$ OWNER_GROUP${RESET}${GOLD} should be defined in the environment, or from docker-compose.${RESET} "
27- echo -e " ${GOLD} Falling back to an internal definition. This will fail if \` /usr/src/site\` does not exist.${RESET} "
27+ echo -e " ${GOLD} Falling back to internal definition. This run will fail if \` /usr/src/site\` does not exist. (permissions.sh) ${RESET} "
2828
2929 OWNER_GROUP=$( stat -c " %u:%g" /usr/src/site)
3030fi
3131
32- echo -e " ${GOLD} Resetting permissions"
32+ echo
33+ echo -e " ${GOLD}${BOLD} Resetting permissions${RESET} "
3334
3435# This list is intentionally granular for files outside of the theme directory
3536TOP_LEVEL_FILES=(
@@ -60,7 +61,7 @@ find /usr/src/boilerplate-tooling -type f -printf "%P\n" | while read f; do
6061 echo -ne " ${DO}${GOLD} Resetting permissions: Boilerplate tooling: ${CYAN}${f}${CLEAR} \r"
6162 chown -f " ${OWNER_GROUP} " " /usr/src/site/${f} "
6263 chmod -f 0664 " /usr/src/site/${f} "
63- sleep 0.8s
64+ sleep 0.2s
6465done
6566echo -e " ${DONE} Boilerplate tooling${CLEAR} "
6667sleep 0.2s
@@ -89,4 +90,4 @@ find /usr/src/site/wp-content -type f -wholename '*acf-json/*.json' -exec chown
8990echo -e " ${DONE} acf-json Permissions & Ownership${CLEAR} "
9091sleep 0.2s
9192
92- echo -e " ${DONE}${GREEN} Done!${CLEAR } "
93+ echo -e " ${DONE}${GREEN} Done!${RESET } "
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ CYAN="\033[36m"
1717FAIL=" \r${RED}${BOLD} ×${RESET} "
1818
1919if [[ -z $OWNER_GROUP ]]; then
20- # Lifted from permissions.sh, used to exsure _db, uploads and plugins have correct ownership & permissions
20+ # Lifted from permissions.sh, used to ensure _db, uploads and plugins have correct ownership & permissions
2121 # NOTE: Definiing this variable in the script is a fallback and probably deprecated or only for testing.
22- # The value should be definied from the docker call or from the docker-compose file.
22+ # The value should already be defined before this script is called. (eg. the docker call or in docker-compose)
2323 echo -e " ${GOLD} DEPRECATED: ${BOLD} \$ OWNER_GROUP${RESET}${GOLD} should be defined in the environment, or from docker-compose.${RESET} "
24- echo -e " ${GOLD} Falling back to an internal definition. This will fail if \` /usr/src/site\` does not exist.${RESET} "
24+ echo -e " ${GOLD} Falling back to internal definition. This run will fail if \` /usr/src/site\` does not exist. (pull.sh) ${RESET} "
2525
2626 OWNER_GROUP=$( stat -c " %u:%g" /usr/src/site)
2727fi
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ if [[ -z "$DESCRIPTION" ]]; then
6767fi
6868
6969echo
70- echo -e " ${BOLD} Setting up WordPress environment${RESET} "
70+ echo -e " ${GOLD}${ BOLD} Setting up WordPress environment${RESET} "
7171echo -e " Theme name: ${CYAN}${NAME}${RESET} "
7272if [[ -n " $DESCRIPTION " ]]; then
7373 echo -e " Description: ${CYAN}${DESCRIPTION}${RESET} "
@@ -151,7 +151,7 @@ echo -e "$DONE"
151151# install everything from package.json but won't rewrite package-lock.json
152152if [[ ! -s /usr/src/site/package-lock.json ]]; then
153153 echo -ne " ${DO} Creating placeholder ${CYAN} package-lock.json${RESET} file"
154- echo ' {"lockfileVersion":2}' > /usr/src/site/package-lock.json
154+ echo ' {"lockfileVersion":2}' > /usr/src/site/package-lock.json
155155 sleep 0.2s
156156 echo -e " $DONE "
157157fi
You can’t perform that action at this time.
0 commit comments