Skip to content

Instantly share code, notes, and snippets.

@Oshuma
Created June 14, 2010 19:33
Show Gist options
  • Save Oshuma/438171 to your computer and use it in GitHub Desktop.
Save Oshuma/438171 to your computer and use it in GitHub Desktop.
# Ubuntu Linux Specific Configuration
export GREP_OPTIONS='--color=auto -Hn'
export PATH=$PATH:"$HOME/Source/Java/BlackBerry/WTK2.5.2/bin"
function trash() {
mv -i $* $HOME/.local/share/Trash/files/
}
function use_ruby() {
version=$1
if [ ! $version ]; then echo "Usage: $0 <version>"; return; fi
echo "Switching to Ruby v$version";
binaries=( erb gem irb rake rdoc ruby testrb )
for bin in $binaries; do
full_name="$bin$version"
full_path=`which $full_name`
if [ ! -e $full_path ]; then
echo "$full_path not found...skipping!"
continue
fi
echo "Using $full_path"
# echo "sudo update-alternatives --set $bin $full_path"
sudo /usr/sbin/update-alternatives --set $bin $full_path
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment