Created
November 10, 2016 17:27
-
-
Save richardblondet/9704ffc144a124f37f5ae4379b75c7c5 to your computer and use it in GitHub Desktop.
Shell script for downloading Wordpress in the current 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 | |
# argument espanish or english | |
echo -n "Installing latest wordpress, choose locale (en/es): ... " | |
# wait for my input | |
# read w1 | |
echo "default locale: en" | |
w1="en" | |
#Our vars | |
LOCALE="" | |
WORDPRESS="http://wordpress.org/" | |
if [ $w1 = "en" ]; then | |
LOCALE="latest.tar.gz" | |
else | |
LOCALE="latest-es_ES.tar.gz" | |
fi | |
# get latest english version | |
echo "Downloading wordpress..." | |
wget $WORDPRESS$LOCALE | |
# uncompress | |
echo "Uncompressing wordpress $LOCALE ..." | |
tar xfz $LOCALE | |
# Remove | |
echo "Removing $LOCALE ..." | |
rm $LOCALE | |
# copy all contents to current directory | |
echo "Taking all contents to current directory..." | |
cp -r wordpress/* . | |
echo "Removing wordpress directory..." | |
rm -r wordpress/ | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment