Skip to content

Instantly share code, notes, and snippets.

@ubaldop
Created October 20, 2016 13:53
Show Gist options
  • Save ubaldop/9637c0aad080aba9a37a2a905cb13e58 to your computer and use it in GitHub Desktop.
Save ubaldop/9637c0aad080aba9a37a2a905cb13e58 to your computer and use it in GitHub Desktop.
Basic vanilla bash script to provision liquidprompt in Vagrant VMs
#!/bin/bash
if [ ! -f ~/runonce ] #here the check is on the root home directory
then
echo ':::: setting up liquidprompt to vagrant machine ::::'
echo "Installing liquidprompt..."
cd /home/vagrant/
git clone https://github.com/nojhan/liquidprompt.git
source liquidprompt/liquidprompt
echo "Setting up liquidprompt to the .bashrc folder"
echo '# Only load Liquid Prompt in interactive shells, not from a script or from scp' >> /home/vagrant/.bashrc
echo '[[ $- = *i* ]] && source /home/vagrant/liquidprompt/liquidprompt' >> /home/vagrant/.bashrc
touch ~/runonce
else
echo "liquidprompt setup already performed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment