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

View File

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

View File

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

View File

@ -21,5 +21,11 @@ setup(
packages=['remotesyn'], packages=['remotesyn'],
licence='BSD Licence', licence='BSD Licence',
install_requires=['paramiko', 'html2text'], 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'
],
},
) )