| 60 | |
| 61 | |
| 62 | def update_man3_link(): |
| 63 | man3_path = os.path.join(environ.cache_dir, 'man3') |
| 64 | |
| 65 | if os.path.lexists(man3_path): |
| 66 | if os.path.islink(man3_path): |
| 67 | if os.readlink(man3_path) == environ.config.Source: |
| 68 | return |
| 69 | else: |
| 70 | os.unlink(man3_path) |
| 71 | else: |
| 72 | raise RuntimeError("Can't create link since `%s' already exists" % |
| 73 | man3_path) |
| 74 | try: |
| 75 | os.makedirs(os.path.join(environ.cache_dir, environ.config.Source)) |
| 76 | except Exception: |
| 77 | pass |
| 78 | |
| 79 | os.symlink(environ.config.Source, man3_path) |
| 80 | |
| 81 | |
| 82 | def get_width(): |