mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
don't recurse into .vim/bundle, also diagnostics
This commit is contained in:
parent
5e3213249a
commit
6642afd752
1 changed files with 10 additions and 5 deletions
15
install
15
install
|
@ -61,8 +61,12 @@ softlink_pseudo() {
|
||||||
local d1="$1/$REPLY"
|
local d1="$1/$REPLY"
|
||||||
local d2="$2/$REPLY"
|
local d2="$2/$REPLY"
|
||||||
if [ -d "$d2" ]; then
|
if [ -d "$d2" ]; then
|
||||||
softlink_pseudo "$d1" "$d2"
|
if [ "$d1" != ".vim/bundle" ]; then # buggy on Windows
|
||||||
|
#warn $'\e[34m / \e[0m' "$d1 $d2"
|
||||||
|
softlink_pseudo "$d1" "$d2" || exit 1
|
||||||
|
fi
|
||||||
elif [ -f "$d2" ]; then
|
elif [ -f "$d2" ]; then
|
||||||
|
#warn $'\e[34m * \e[0m' "$d1"
|
||||||
hardlink "$d1" "$d2"
|
hardlink "$d1" "$d2"
|
||||||
else
|
else
|
||||||
die "i don't know how to pseudo-symlink $d2"
|
die "i don't know how to pseudo-symlink $d2"
|
||||||
|
@ -80,8 +84,9 @@ softlink_pseudo() {
|
||||||
[ "$d1" == ".vim/bundle" ] && continue
|
[ "$d1" == ".vim/bundle" ] && continue
|
||||||
[ "$d1" == ".vim/swp" ] && continue
|
[ "$d1" == ".vim/swp" ] && continue
|
||||||
[ "$d1" == ".vim/undo" ] && continue
|
[ "$d1" == ".vim/undo" ] && continue
|
||||||
warn "new destination file. consider manually moving it:"
|
#warn "new destination file. consider manually moving it:"
|
||||||
warn "$d1"
|
#warn $'\e[32m + \e[0m' "$d1"
|
||||||
|
warn ' + ' "$d1"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -89,13 +94,13 @@ softlink_pseudo() {
|
||||||
softlink() {
|
softlink() {
|
||||||
if [ -n "$MSYSTEM" ]; then
|
if [ -n "$MSYSTEM" ]; then
|
||||||
# MSYS2 does not have nor emulate symbolic links.
|
# MSYS2 does not have nor emulate symbolic links.
|
||||||
softlink_pseudo "$@"
|
softlink_pseudo "$@" || exit 1
|
||||||
else
|
else
|
||||||
softlink_nix "$@"
|
softlink_nix "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
which readlink >/dev/null || exit 1
|
which readlink >/dev/null || exit 1 # sanity check
|
||||||
|
|
||||||
rc="$(readlink -f "$(dirname "$0")" )"
|
rc="$(readlink -f "$(dirname "$0")" )"
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
|
|
Loading…
Add table
Reference in a new issue