Skip to content

Commit 6b1eb43

Browse files
authored
Merge pull request #15 from jaewook77/master
Create the missing directory when symlink dotfiles into the destination.
2 parents 636fc57 + 77cb800 commit 6b1eb43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bin/dotsync

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ getrealdotfile()
124124
fi
125125
126126
DOTFILE="$HOME/$DSTFILE"
127+
DOTFILE_DIR=$(dirname "${DOTFILE}")
127128
}
128129
129130
initlocal()
@@ -169,6 +170,7 @@ symlink()
169170
rm -f "$DOTFILE"
170171
ln -s "$REALFILE" "$DOTFILE"
171172
else
173+
mkdir -p "$DOTFILE_DIR"
172174
ln -s "$REALFILE" "$DOTFILE"
173175
fi
174176

0 commit comments

Comments
 (0)