Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/997_setup_ps1.sh":
mode: "000755"
owner: ec2-user
group: ec2-user
content: |
#!/usr/bin/env bash
# Custom bash prompt via kirsle.net/wizards/ps1.html ("Pink and Blue" theme)
echo "Setting up PS1 ..."
if cat /home/ec2-user/.bashrc | grep -q "PS1"
then
echo "Already set up PS1"
else
echo "" >> /home/ec2-user/.bashrc
echo 'export PS1="\[$(tput bold)\]\[$(tput setaf 4)\][\[$(tput setaf 5)\]\u\[$(tput setaf 4)\]@\[$(tput setaf 5)\]\h \[$(tput setaf 2)\]\W\[$(tput setaf 4)\]]\\$ \[$(tput sgr0)\]"' >> /home/ec2-user/.bashrc
echo "Set up!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment