Created
September 27, 2021 09:19
-
-
Save kristijandraca/1aa7668dce9c32ca4d58386e13e4a260 to your computer and use it in GitHub Desktop.
Download and extract latest wordpress
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
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo 'Provide folder name as first parameter' | |
exit 1 | |
fi | |
if [ -d $1 ]; then | |
echo 'Folder alrady exists!' | |
exit 1 | |
fi | |
wget https://wordpress.org/latest.zip | |
mkdir -m 777 $1 | |
cd $1 | |
unzip ../latest.zip | |
cd wordpress | |
mv ./* ../ | |
cd .. | |
rm -rf wordpress | |
cd .. | |
rm latest.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment