Created
February 1, 2018 16:30
-
-
Save stewil87/1b11712ec3ea25e7329f1110f4582297 to your computer and use it in GitHub Desktop.
Download and extract latest Wordpress Release in specified or script directory
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 | |
read -p "Enter install path. if empty, will use path of this script: " SCRIPTPATH | |
if [ -z "$SCRIPTPATH" ]; then | |
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" | |
fi | |
echo Download latest Wordpress | |
wget -P $SCRIPTPATH https://wordpress.org/latest.tar.gz | |
echo Unpacking Wordpress | |
tar -xzvf $SCRIPTPATH/latest.tar.gz | |
echo Move files from Wordpress | |
mv -v $SCRIPTPATH/wordpress/* $SCRIPTPATH | |
echo Delete Wordpress riginal files | |
rmdir $SCRIPTPATH/wordpress | |
rm $SCRIPTPATH/latest.tar.gz | |
echo done | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment