Skip to content

Instantly share code, notes, and snippets.

@DAddYE
Created August 7, 2011 01:15
Show Gist options
  • Save DAddYE/1129954 to your computer and use it in GitHub Desktop.
Save DAddYE/1129954 to your computer and use it in GitHub Desktop.
task :bash do
tpl = <<-TXT.gsub(/^ {4}/, '')
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Colors
export PS1='\\[\\033[01;31m\\]\\u\\[\\033[01;33m\\]@\\[\\033[01;36m\\]\\h \\[\\033[01;33m\\]\\w \\[\\033[01;35m\\]\\$ \\[\\033[00m\\]'
export LS_OPTIONS="--human --color=always"
TXT
conn.exec "touch /root/.bashrc"
conn.replace :all, tpl, "/root/.bashrc"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment