Created
August 12, 2022 21:18
-
-
Save kmwalsh/40728e77d88b7fb2d9a0fd048d564c23 to your computer and use it in GitHub Desktop.
self-updating modified plugin
This file contains 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 | |
# copy patches and update.sh to temporary directory | |
cp -r ./patches ~/tmp/wp-security-audit-log | |
cp -r ./update.sh ~/tmp/wp-security-audit-log | |
# get latest and unzip | |
curl -O https://downloads.wordpress.org/plugin/wp-security-audit-log.latest-stable.zip | |
unzip wp-security-audit-log.latest-stable.zip | |
# move to overwrite current, requires "A" keypress | |
cp -r wp-security-audit-log ../ | |
# cleanup | |
rm wp-security-audit-log.latest-stable.zip | |
rm -rf wp-security-audit-log | |
# replace patches and update.sh back to current directory | |
cp -r ~/tmp/wp-security-audit-log/patches ./ | |
cp -r ~/tmp/wp-security-audit-log/update.sh ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment