Last active
May 25, 2020 21:00
-
-
Save Phlow/9e16844053b01dcdbdbb to your computer and use it in GitHub Desktop.
Batch Script – Download, Extract, Prepare WordPress and Plugins
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
# This script fetches WordPress plus some plugins with Wget, | |
# extracts everything, removes clutter and moves plugins into | |
# the right places. | |
# | |
# Option -e prints escape sequences like breaks \n | |
# | |
reset='\x1B[0m' | |
green='\x1b[0;32m' | |
yellow='\x1b[0;33m' | |
clear; | |
cd /Users/moritz/Desktop | |
echo -e "\n${yellow}WordPress-Downloader${reset}\n" | |
echo -e "Make directory ${yellow}WORDPRESS${reset}" | |
mkdir WORDPRESS | |
cd WORDPRESS | |
echo -e "\n${reset}// FETTCHING..." | |
echo -e "${yellow}" | |
wget --quiet --show-progress https://de.wordpress.org/latest-de_DE.zip | |
wget --quiet --show-progress https://downloads.wordpress.org/plugin/jetpack.zip | |
wget --quiet --show-progress http://downloads.wordpress.org/plugin/wordpress-seo.zip | |
wget --quiet --show-progress http://downloads.wordpress.org/plugin/contact-form-7.zip | |
echo -e "\n${reset}// UNZIPPING...\n" | |
for zip in *.zip | |
do | |
echo -e "${yellow}$zip${reset}..." | |
unzip -q $zip | |
rm $zip | |
done | |
echo -e "\n// ORGANISING${reset}...\n" | |
echo -e "${yellow}Removing${reset} unnecessary files..." | |
rm wordpress/readme.html wordpress/license.txt wordpress/liesmich.html; | |
rm wordpress/wp-content/plugins/hello.php | |
echo -e "${yellow}Moving${reset} plugins to wp-content/plugins/..." | |
mv jetpack wordpress/wp-content/plugins/ | |
mv wordpress-seo wordpress/wp-content/plugins/ | |
mv contact-form-7 wordpress/wp-content/plugins/ | |
echo -e "${yellow}Moving${reset} all files one folder up..." | |
mv wordpress/* . | |
echo -e "${yellow}Remove${reset} old wordpress-folder..." | |
rmdir wordpress/ | |
echo -e "\n// WordPress ${green}sucessful${reset} downloaded :)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment