Created
April 8, 2015 13:10
-
-
Save ibnesayeed/e7c506669631987223b7 to your computer and use it in GitHub Desktop.
A script to automatically download XenForo from customer area
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
#! /usr/bin/env bash | |
############################################################################### | |
# CONFIG # | |
############################################################################### | |
EMAIL="xenforo%40gmail.com" | |
PASSWORD="p4ssw0rd" | |
LICENSE="12A3B4CD56" | |
############################################################################### | |
# DO NOT EDIT BELOW # | |
############################################################################### | |
# remove old version | |
rm -f ./xf-upgrade.zip | |
# login | |
curl -c ./xfcookie --data "email=$EMAIL&password=$PASSWORD" https://xenforo.com/customers/login | |
# grab latest version id | |
VERSION_ID=$(curl -s -b ./xfcookie "https://xenforo.com/customers/download?l=$LICENSE&d=xenforo" | sed -nr 's/^.+<option value="([[:digit:]]+)" selected="selected">.+<\/option>/\1/p') | |
# download | |
curl -b ./xfcookie --data "download_version_id=$VERSION_ID&options[upgradePackage]=1&agree=1&l=$LICENSE&d=xenforo" https://xenforo.com/customers/download -o ./xf-upgrade.zip | |
# cleanup | |
rm -f ./xfcookie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment