2013-03-22 10:15:50 -07:00
|
|
|
|
2013-03-22 18:13:45 -07:00
|
|
|
# Check if a symlink exists before trying to create it
|
2013-03-22 10:15:50 -07:00
|
|
|
function do_link {
|
2013-03-23 00:44:56 -07:00
|
|
|
if [ -e "$2" ]; then
|
|
|
|
rm -rf "$2"
|
2013-03-22 10:15:50 -07:00
|
|
|
fi
|
2013-03-22 18:13:45 -07:00
|
|
|
if [ ! -e "$2" ]; then
|
|
|
|
ln -sf "$1" "$2"
|
|
|
|
fi
|
2013-03-22 10:15:50 -07:00
|
|
|
}
|
2013-03-22 18:10:59 -07:00
|
|
|
|
|
|
|
# vim:set ft=zsh:
|