Last active
May 29, 2021 09:19
-
-
Save rwprodev/ea58c9519f45302690b4818051c4d199 to your computer and use it in GitHub Desktop.
Script to upgrade Sendy to a new version
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
| #!/usr/bin/sh | |
| if [ "$#" -ne 2 ]; then | |
| echo "Usage: $0 OLD_VERSION NEW_VERSION" >&2 | |
| exit 1 | |
| fi | |
| export OLD=$1 | |
| export NEW=$2 | |
| echo Migrating from $OLD to $NEW | |
| cp $OLD/includes/config.php $NEW/includes/ | |
| cp $OLD/includes/cors_allow.php $NEW/includes/ | |
| cp -r $OLD/uploads/ $NEW | |
| cp $OLD/.htaccess $NEW | |
| # CORS | |
| sed -ie "/includes\/config.php/a \\\tinclude('includes\/cors_allow.php');" $NEW/subscribe.php | |
| sed -ie "/includes\/config.php/a \\\tinclude('includes\/cors_allow.php');" $NEW/unsubscribe.php | |
| #rm public_html | |
| #ln -s $NEW public_html | |
| echo Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment