dotfiles/justfile

15 lines
365 B
Makefile
Raw Normal View History

2023-02-18 12:35:56 +00:00
add target:
#!/bin/env sh
target={{trim_end_matches(target, '/')}}
find $target -mindepth 1 | while read p
do
t=~/`echo -n $p | sed "s/^$target\///" | sed s/dot-/./g`
s="{{justfile_directory()}}/$p"
if ( ! test -e $t ); then
echo "Linking $t -> $s"
ln -s $s $t
fi
done
# vim: set ft=sh :