mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Move / rename / make script more robust w.r.t to path from which its called
This commit is contained in:
parent
934d15cb51
commit
1e95a5d738
1 changed files with 6 additions and 4 deletions
|
@ -9,7 +9,9 @@ Pages are stored in OUTPUT_DIR
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
|
||||||
ACTIONSMAP_FILE = '/usr/share/moulinette/actionsmap/yunohost.yml'
|
|
||||||
|
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + '/../data/actionsmap/yunohost.yml'
|
||||||
OUTPUT_DIR ="output/"
|
OUTPUT_DIR ="output/"
|
||||||
|
|
||||||
# creates output directory
|
# creates output directory
|
||||||
|
@ -17,7 +19,7 @@ os.system("mkdir "+ OUTPUT_DIR )
|
||||||
|
|
||||||
|
|
||||||
# man page of yunohost
|
# man page of yunohost
|
||||||
cmd = "sudo help2man \" yunohost \" -o " + OUTPUT_DIR + "yunohost"
|
cmd = "sudo help2man \" yunohost \" -o " + OUTPUT_DIR + "yunohost"
|
||||||
print(cmd)
|
print(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
@ -36,6 +38,6 @@ with open(ACTIONSMAP_FILE, 'r') as stream:
|
||||||
ACTIONS_DICT[domain] = ACTIONS_STR
|
ACTIONS_DICT[domain] = ACTIONS_STR
|
||||||
for action in ACTIONS:
|
for action in ACTIONS:
|
||||||
#print("yunohost", domain, action)
|
#print("yunohost", domain, action)
|
||||||
cmd = "sudo help2man \" yunohost " + domain + " " + action + " --help \" -o " + OUTPUT_DIR + "yunohost_" + domain+ "_" + action
|
cmd = "sudo help2man \" yunohost " + domain + " " + action + " --help \" -o " + OUTPUT_DIR + "yunohost_" + domain+ "_" + action
|
||||||
print(cmd)
|
print(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
Loading…
Add table
Reference in a new issue