- $act ln -s "$basepath/$dot" "$inhome"
- elif [ -f "$inhome" ] && cmp -s "$dot" "$inhome"; then
- needs setup "identical here but not yet symlinked"
- $act rm -f "$inhome"~
- $act ln -s "$basepath/$dot" "$inhome"~
- $act mv -f "$inhome"~ "$inhome"
+ $act ln -s "$linktarget" "$inhome"
+ elif [ -f "$inhome" ] && [ -f "$ours" ]; then
+ if cmp -s "$ours" "$inhome"; then
+ needs setup "identical in this ~ but not yet symlinked"
+ $act rm -f "$inhome"~
+ $act ln -s "$linktarget" "$inhome"~
+ $act mv -f "$inhome"~ "$inhome"
+ else
+ needs import "modified here"
+ $act rm -f "$ours"~
+ $act cp "$inhome" "$ours"~
+ $act mv -f "$ours"~ "$ours"
+ fi
+ elif [ -d "$inhome" ] && [ -d "$ours" ]; then
+ needs dirimport "directory in this ~, not yet symlinked"
+ $act mv "$ours" "$ours~"
+ $act ln -s "$linktarget" "$inhome"~
+ $act mv "$inhome" "$ours"
+ $act mv "$inhome~" "$inhome"
+ $act rm -rf "$ours~"