Skip to content

Commit

Permalink
scripts/unocommands.py: expand path and check dirs params exist
Browse files Browse the repository at this point in the history
Signed-off-by: Méven Car <[email protected]>
Change-Id: I78fc016e4ffbf19fa0b6507272d17374f1106878
  • Loading branch information
meven authored and timar committed Jan 10, 2025
1 parent 6b53035 commit db0310f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/unocommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,18 @@ def writeTranslations(onlineDir, translationsDir, strings):
usageAndExit()

onlineDir = sys.argv[2]
lofficeDir = sys.argv[3]
lofficeDir = os.path.abspath(sys.argv[3])
if not os.path.isdir(lofficeDir):
sys.stderr.write("ERROR: invalid loffice parameter '{}' is not a dir\n".format(sys.argv[3]))
exit(1)
else:
usageAndExit()

onlineDir = os.path.abspath(onlineDir)
if not os.path.isdir(onlineDir):
sys.stderr.write("ERROR: invalid online_dir parameter '{}' is not a dir\n".format(sys.argv[2]))
exit(1)

menuCommands = extractMenuCommands(onlineDir)
contextCommands = extractContextCommands(onlineDir)
toolbarCommands = extractToolbarCommands(onlineDir)
Expand Down

0 comments on commit db0310f

Please sign in to comment.