Fix path traverse error that caused patch to be copied to the incorrect location

This commit is contained in:
xZero707 2022-01-15 06:17:26 +01:00
parent d805f0e76f
commit 7d7ee64551
Signed by untrusted user who does not match committer: xZero707
GPG Key ID: 3CC53DCAA9C237BB

View File

@ -49,11 +49,11 @@ echo "> Patch file created ${PATCH_FILE}"
if [ -n "${WP_VERSION}" ]; then
echo "> WordPress version defined: ${WP_VERSION}"
echo "> Copying the patch file..."
mkdir "../../patches/${WP_VERSION}" -p
cp -v "./${PATCH_FILE}" "../../patches/${WP_VERSION}/"
mkdir "../../../patches/${WP_VERSION}" -p
cp -v "./${PATCH_FILE}" "../../../patches/${WP_VERSION}/"
else
echo "> Please run: "
echo " cp './wp-src/${PATCH_FILE}' '../../patches/5.x.x/'"
echo " cp './wp-src/${PATCH_FILE}' '../../../patches/5.x.x/'"
fi