| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | from scriptCommon import catchPath |
| 4 | import os |
| 5 | import subprocess |
| 6 | |
| 7 | # --------------------------------------------------- |
| 8 | # Update code examples |
| 9 | # --------------------------------------------------- |
| 10 | # For info on mdsnippets, see https://github.com/SimonCropp/MarkdownSnippets |
| 11 | |
| 12 | # install dotnet SDK from http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 |
| 13 | # Then install MarkdownSnippets.Tool with |
| 14 | # dotnet tool install -g MarkdownSnippets.Tool |
| 15 | # To update: |
| 16 | # dotnet tool update -g MarkdownSnippets.Tool |
| 17 | # To uninstall (e.g. to downgrade to a lower version) |
| 18 | # dotnet tool uninstall -g MarkdownSnippets.Tool |
| 19 | |
| 20 | os.chdir(catchPath) |
| 21 | |
| 22 | subprocess.run('dotnet tool update -g MarkdownSnippets.Tool --version 21.2.0', shell=True, check=True) |
| 23 | subprocess.run('mdsnippets', shell=True, check=True) |