diff options
Diffstat (limited to 'scripts/lib/recipetool/edit.py')
| -rw-r--r-- | scripts/lib/recipetool/edit.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/scripts/lib/recipetool/edit.py b/scripts/lib/recipetool/edit.py deleted file mode 100644 index d5b980a1c0..0000000000 --- a/scripts/lib/recipetool/edit.py +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | # Recipe creation tool - edit plugin | ||
| 2 | # | ||
| 3 | # This sub-command edits the recipe and appends for the specified target | ||
| 4 | # | ||
| 5 | # Example: recipetool edit busybox | ||
| 6 | # | ||
| 7 | # Copyright (C) 2018 Mentor Graphics Corporation | ||
| 8 | # | ||
| 9 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 10 | # | ||
| 11 | |||
| 12 | import argparse | ||
| 13 | import errno | ||
| 14 | import logging | ||
| 15 | import os | ||
| 16 | import re | ||
| 17 | import subprocess | ||
| 18 | import sys | ||
| 19 | import scriptutils | ||
| 20 | |||
| 21 | |||
| 22 | logger = logging.getLogger('recipetool') | ||
| 23 | tinfoil = None | ||
| 24 | |||
| 25 | |||
| 26 | def tinfoil_init(instance): | ||
| 27 | global tinfoil | ||
| 28 | tinfoil = instance | ||
| 29 | |||
| 30 | |||
| 31 | def edit(args): | ||
| 32 | import oe.recipeutils | ||
| 33 | |||
| 34 | recipe_path = tinfoil.get_recipe_file(args.target) | ||
| 35 | appends = tinfoil.get_file_appends(recipe_path) | ||
| 36 | |||
| 37 | return scriptutils.run_editor([recipe_path] + list(appends), logger) | ||
| 38 | |||
| 39 | |||
| 40 | def register_commands(subparsers): | ||
| 41 | parser = subparsers.add_parser('edit', | ||
| 42 | help='Edit the recipe and appends for the specified target. This obeys $VISUAL if set, otherwise $EDITOR, otherwise vi.') | ||
| 43 | parser.add_argument('target', help='Target recipe/provide to edit') | ||
| 44 | parser.set_defaults(func=edit, parserecipes=True) | ||
