Skip to content

Instantly share code, notes, and snippets.

@codeasashu
Created September 28, 2016 06:36
Show Gist options
  • Save codeasashu/de98af89d0b2edaf4efc69393ef19cee to your computer and use it in GitHub Desktop.
Save codeasashu/de98af89d0b2edaf4efc69393ef19cee to your computer and use it in GitHub Desktop.
Collection of useful ubuntu bash scripts
#!/bin/bash
# Bash script to install latest wordpress from repo
#Uses wget
#Download latest wordpress
wget -O latest.tar.gz "https://wordpress.org/latest.tar.gz"
#Extract contents
tar xvzf latest.tar.gz
cd wordpress
#move everything to parent directory
find . -maxdepth 1 -exec mv {} .. \;
#remove wordpress subdirectory and latest tar file
rm -rf wordpress
rm -rf latest.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment