mkdir -p ~/.cache-persist/gitstatus; cd ~/.cache-persist; echo 'Downloading gitstatusd...'; wget -q 'https://github.com/romkatv/gitstatus/releases/latest/download/gitstatusd-linux-x86_64.tar.gz' >/dev/null; echo 'Download complete!'; tar xzvf gitstatusd-linux-x86_64.tar.gz >/dev/null; rm gitstatusd-linux-x86_64.tar.gz; mv gitstatusd-linux-x86_64 gitstatus/; touch ~/.zshrc; cat >> ~/.zshrc <<- EOM # Keep a persistent cache to stop gitstatus downloading itself every time if [ ! -e "\$XDG_CACHE_HOME/gitstatus" ]; then cp -r "\$HOME/.cache-persist/"* "\$XDG_CACHE_HOME"; fi EOM cd - >/dev/null; echo 'Done!';