Created
October 17, 2021 15:42
-
-
Save hegemanjr/448c0485adde5e15cb098280782c2806 to your computer and use it in GitHub Desktop.
Update composer packages in WordPress theme and plugin directories
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
#!/bin/bash | |
composer update | |
for dir in {*,wp-content/plugins/*,wp-content/themes/*} | |
do | |
if [ -d $dir ] | |
then | |
pushd $dir | |
if [ -f composer.json ] | |
then | |
composer update | |
fi | |
popd | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment