mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2025-12-11 01:32:41 +01:00
Add tool/util [patch-util] - useful only for devs/contributors
This commit is contained in:
23
build/patch-util/rootfs/wp/entrypoint.sh
Executable file
23
build/patch-util/rootfs/wp/entrypoint.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "> Downloading WordPress ${WP_VERSION} ..."
|
||||
|
||||
# Removes trailing zero if found
|
||||
WP_SHORT_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0//g');
|
||||
|
||||
wp --allow-root --path="/tmp" core download --locale="${WP_LOCALE}" --version="${WP_SHORT_VERSION}"
|
||||
|
||||
if [ ! -f "/tmp/wp-admin/update-core.php" ]; then
|
||||
echo "X WordPress download failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir src -p
|
||||
rm src/* -f
|
||||
|
||||
cp /tmp/wp-admin/update-core.php src/
|
||||
cp src/update-core.php src/mod-update-core.php
|
||||
|
||||
echo "> Files ready."
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user