dotfiles/recipes/_link

14 lines
270 B
Text
Raw Normal View History

2018-08-10 18:41:46 +00:00
#!/bin/bash
set -e
_link() {
source=$1
target=$2
if [ ! -e $target ]; then
2018-08-14 04:39:50 +00:00
_run "[link] Install $target" mkdir -p $(dirname $target) \
&& ln -s $source $target
2018-08-10 18:41:46 +00:00
else
echo "[link] $target already installed, skipping."
fi
}