Skip to content

Instantly share code, notes, and snippets.

@umitanuki
Created May 25, 2011 08:41
Show Gist options
  • Save umitanuki/990593 to your computer and use it in GitHub Desktop.
Save umitanuki/990593 to your computer and use it in GitHub Desktop.
switch ~/local/{foo}-{bar}
#!/bin/bash
base=$1
version=$2
if [ -z "$base" -o -z "$version" ]
then
echo "Usage $0 <base> <version>"
else
rm -f ~/local/$base
ln -s ~/local/$base-$version ~/local/$base
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment