Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from cloverinteractive/ubuntu_support

Added ubuntu configuration and some aliases
  • Loading branch information...
commit ef6593d9217ae3e6dc8b1e23857f9195ff232b1b 2 parents fdf8d84 + d266aef
@EnriqueVidal EnriqueVidal authored
Showing with 27 additions and 0 deletions.
  1. +2 −0  Rakefile
  2. +25 −0 bash/bash_profile.erb
View
2  Rakefile
@@ -9,6 +9,7 @@ require 'term/ansicolor'
include Term::ANSIColor
$is_darwin = `uname`.strip.include? "Darwin"
+$is_linux = `uname`.strip.include? "Linux"
$has_macports = `which port`.any?
$has_apt = `which apt-get`.any?
$prefix = ENV['PREFIX'] || ENV['HOME']
@@ -90,6 +91,7 @@ namespace :install do
erb_env = Proc.new do
@is_darwin = $is_darwin
+ @is_linux = $is_linux
@has_macports = $has_macports
@has_apt_get = $has_apt
@prefix = $prefix
View
25 bash/bash_profile.erb
@@ -37,9 +37,22 @@ alias mysql=mysql5
alias mysqldump=mysqldump5
alias gvim=mvim
<% end %>
+
+if [ -x /usr/bin/dircolors ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ alias ls='ls --color=auto'
+ alias grep='grep --color=auto'
+ alias fgrep='fgrep --color=auto'
+ alias egrep='egrep --color=auto'
+fi
+
alias ls='ls --color=auto'
alias grep='grep --color=auto'
+alias ll='ls -alF'
+alias la='ls -A'
+alias l='ls -CF'
+
export EDITOR=vim
<% if @is_darwin %>
export VISUAL=mvim
@@ -49,6 +62,18 @@ export VISUAL=gvim
export GIT_EDITOR='gvim -f'
<% end %>
+<% if @is_linux %>
+
+#Ubuntu alias for notify-send
+alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
+
+# Bash completition for ubuntu (from default .bashrc in ubuntu)
+if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
+ . /etc/bash_completion
+fi
+
+<% end %>
+
# Create this file toload extras after
if [ -f <%= @prefix %>/.bash_profile.after ]; then
. <%= @prefix %>/.bash_profile.after
Please sign in to comment.
Something went wrong with that request. Please try again.