Skip to content

Instantly share code, notes, and snippets.

@loisaidasam
Last active November 19, 2015 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loisaidasam/d4cd1bc55a0c62ca6554 to your computer and use it in GitHub Desktop.
Save loisaidasam/d4cd1bc55a0c62ca6554 to your computer and use it in GitHub Desktop.
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