Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (16 sloc) 392 Bytes
#/bin/bash
for f in `pwd`/copy/*
do
[[ -f $f ]] && cp -i $f ~/.`basename $f`
done
for f in `pwd`/link/*
do
link_to_be=~/.`basename $f`
if [ -f $link_to_be -a ! -L $link_to_be ]; then
read -p "Diff $f and $link_to_be? "
[[ $REPLY == "y" ]] && diff $f $link_to_be
fi
if [ "$f" != "`readlink $link_to_be`" ]; then
ln -nsi $f $link_to_be
fi
done