Skip to content

Commit

Permalink
Fix symlinking of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlee committed Apr 22, 2010
1 parent 65e5c15 commit 2386991
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,12 @@ def _stage_flat_dir(self, path, dest):

def _symlink_flat_dir(self, path):
for filename in os.listdir(path):
target = os.path.join(path, filename)
link_dir = os.path.dirname(path)
if not os.path.islink(os.path.join(link_dir, filename)):
self._env.cmd(["ln", "-s", "-t", link_dir, target])
target = os.path.relpath(os.path.join(path, filename), link_dir)
link_path = os.path.join(link_dir, filename)
if not os.path.islink(link_path) or \
os.path.realpath(link_path) != target:
self._env.cmd(["ln", "-f", "-s", "-t", link_dir, target])

def collate(self, log):
stage = self._stage
Expand Down

0 comments on commit 2386991

Please sign in to comment.