Created
December 21, 2017 07:53
-
-
Save ramonfincken/4c2c29f4a5b209280cd436f8f827b9e5 to your computer and use it in GitHub Desktop.
WordPress Composer multiple mu-plugins fix: muplugins.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bash | |
# Author: Ramon Fincken, https://www.mijnpress.nl | |
BASEDIR=web/app/mu-plugins | |
muplugindirs=`ls $BASEDIR` | |
for i in $muplugindirs | |
do | |
if [[ -d ${BASEDIR}/${i} ]] | |
then | |
cd ${BASEDIR}/${i} | |
mv *.php ../ | |
cd - | |
rm -rf ${BASEDIR}/${i} | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Featured in https://www.mijnpress.nl/2017/wordpress-composer-multiple-mu-plugins-fix/ 1 of 3