Wordpress downloader and unpacker
You don't need to escape slashes for grep, you can simplify to:

tarfile=$(curl -s https://sv.wordpress.org/ | grep -ioE "https://sv.wordpress.org/wordpress-[0-9].[0-9].[0-9]-sv_SE.tar.gz")


curl and wget are too similar tools. Consider using only one of them, to reduce the number of dependencies of your script.

Instead of this:


wget $tarfile -O senaste_wp.tar.gz
tar xvfz senaste_wp.tar.gz -C ./
rm senaste_wp.tar.gz



You can pipe directly to tar, without needing a temporary file, like this:

curl $tarfile | tar xvz


Lastly, your script is not using anything Bash specific, so you could change the shebang line to !#/bin/sh.