Skip to content

Instantly share code, notes, and snippets.

@rwprodev
Last active May 29, 2021 09:19
Show Gist options
  • Select an option

  • Save rwprodev/ea58c9519f45302690b4818051c4d199 to your computer and use it in GitHub Desktop.

Select an option

Save rwprodev/ea58c9519f45302690b4818051c4d199 to your computer and use it in GitHub Desktop.

Revisions

  1. rwprodev revised this gist May 29, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions upgrade_sendy.sh
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ cp $OLD/.htaccess $NEW
    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
    rm public_html
    ln -s $NEW public_html

    echo Done
  2. rwprodev revised this gist May 29, 2021. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions upgrade_sendy.sh
    Original file line number Diff line number Diff line change
    @@ -11,10 +11,15 @@ 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

    rm public_html
    ln -s $NEW public_html
    # 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
  3. rwprodev created this gist Apr 30, 2020.
    20 changes: 20 additions & 0 deletions upgrade_sendy.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/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 -r $OLD/uploads/ $NEW
    cp $OLD/.htaccess $NEW

    rm public_html
    ln -s $NEW public_html

    echo Done