Moved scripts to module

This commit is contained in:
2025-02-21 13:56:31 +01:00
parent 84695d44b4
commit 7ce84f5637
4 changed files with 25 additions and 7 deletions

View File

@ -18,7 +18,7 @@ def print_help():
log(" -h Show this help message")
log(" -c <file> Configuration file, defaults to project.cfg")
if __name__=="__main__":
def main():
# Parse arguments
i = 1
nextarg = None
@ -83,3 +83,7 @@ if __name__=="__main__":
if ret!=0:
log("ERROR: toolchain returned with", ret)
exit(ret)
if __name__=="__main__":
main()

View File

@ -96,7 +96,7 @@ def print_help():
print(" -h Show this help message")
print(" -c <file> Configuration file, defaults to project.cfg")
if __name__=="__main__":
def main():
# Parse arguments
i = 1
nextarg = None
@ -221,3 +221,7 @@ if __name__=="__main__":
for p in subprocesses:
p.kill()
exit(0)
if __name__=="__main__":
main()

View File

@ -257,7 +257,7 @@ def print_help():
print("Options:")
print(" -h Show this help message")
if __name__=="__main__":
def main():
# Parse arguments
i = 1
host = ''
@ -308,3 +308,7 @@ if __name__=="__main__":
for t in threads:
t.join()
t.clean()
if __name__=="__main__":
main()

View File

@ -21,5 +21,11 @@ setup(
packages=['remotesyn'],
licence='BSD Licence',
install_requires=['paramiko', 'html2text'],
scripts=['scripts/rbuild', 'scripts/rmbuild', 'scripts/rmserver']
entry_points={
'console_scripts': [
'rmserver = remotesyn.rmserver:main',
'rmbuild = remotesyn.rmbuild:main',
'rbuild = remotesyn.rbuild:main'
],
},
)