mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix bash_completion
This commit is contained in:
parent
9b89f66bba
commit
dcf1a892bf
2 changed files with 5 additions and 2 deletions
2
debian/install
vendored
2
debian/install
vendored
|
@ -5,6 +5,6 @@ helpers/* /usr/share/yunohost/helpers.d/
|
||||||
conf/* /usr/share/yunohost/conf/
|
conf/* /usr/share/yunohost/conf/
|
||||||
locales/* /usr/share/yunohost/locales/
|
locales/* /usr/share/yunohost/locales/
|
||||||
doc/yunohost.8.gz /usr/share/man/man8/
|
doc/yunohost.8.gz /usr/share/man/man8/
|
||||||
doc/bash-completion.sh /etc/bash_completion.d/yunohost
|
doc/bash_completion.d/* /etc/bash_completion.d/
|
||||||
conf/metronome/modules/* /usr/lib/metronome/modules/
|
conf/metronome/modules/* /usr/lib/metronome/modules/
|
||||||
src/* /usr/lib/python3/dist-packages/yunohost/
|
src/* /usr/lib/python3/dist-packages/yunohost/
|
||||||
|
|
|
@ -13,7 +13,8 @@ import yaml
|
||||||
|
|
||||||
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/../share/actionsmap.yml"
|
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/../share/actionsmap.yml"
|
||||||
BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/bash-completion.sh"
|
BASH_COMPLETION_FOLDER = THIS_SCRIPT_DIR + "/bash_completion.d"
|
||||||
|
BASH_COMPLETION_FILE = BASH_COMPLETION_FOLDER + "/yunohost"
|
||||||
|
|
||||||
|
|
||||||
def get_dict_actions(OPTION_SUBTREE, category):
|
def get_dict_actions(OPTION_SUBTREE, category):
|
||||||
|
@ -61,6 +62,8 @@ with open(ACTIONSMAP_FILE, "r") as stream:
|
||||||
OPTION_TREE[category]["subcategories"], subcategory
|
OPTION_TREE[category]["subcategories"], subcategory
|
||||||
)
|
)
|
||||||
|
|
||||||
|
os.makedirs(BASH_COMPLETION_FOLDER, exist_ok=True)
|
||||||
|
|
||||||
with open(BASH_COMPLETION_FILE, "w") as generated_file:
|
with open(BASH_COMPLETION_FILE, "w") as generated_file:
|
||||||
|
|
||||||
# header of the file
|
# header of the file
|
||||||
|
|
Loading…
Add table
Reference in a new issue