diff --git a/scripts/rbuild b/remotesyn/rbuild.py similarity index 97% rename from scripts/rbuild rename to remotesyn/rbuild.py index 5634e1d..2e88983 100755 --- a/scripts/rbuild +++ b/remotesyn/rbuild.py @@ -18,7 +18,7 @@ def print_help(): log(" -h Show this help message") log(" -c Configuration file, defaults to project.cfg") -if __name__=="__main__": +def main(): # Parse arguments i = 1 nextarg = None @@ -82,4 +82,8 @@ if __name__=="__main__": if ret!=0: log("ERROR: toolchain returned with", ret) - exit(ret) \ No newline at end of file + exit(ret) + + +if __name__=="__main__": + main() \ No newline at end of file diff --git a/scripts/rmbuild b/remotesyn/rmbuild.py similarity index 99% rename from scripts/rmbuild rename to remotesyn/rmbuild.py index 914dce9..f7deb87 100644 --- a/scripts/rmbuild +++ b/remotesyn/rmbuild.py @@ -96,7 +96,7 @@ def print_help(): print(" -h Show this help message") print(" -c Configuration file, defaults to project.cfg") -if __name__=="__main__": +def main(): # Parse arguments i = 1 nextarg = None @@ -220,4 +220,8 @@ if __name__=="__main__": print("ERROR: Connection error...", e) for p in subprocesses: p.kill() - exit(0) \ No newline at end of file + exit(0) + + +if __name__=="__main__": + main() \ No newline at end of file diff --git a/scripts/rmserver b/remotesyn/rmserver.py similarity index 99% rename from scripts/rmserver rename to remotesyn/rmserver.py index f27984a..8a04774 100644 --- a/scripts/rmserver +++ b/remotesyn/rmserver.py @@ -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 = '' @@ -307,4 +307,8 @@ if __name__=="__main__": for t in threads: t.join() - t.clean() \ No newline at end of file + t.clean() + + +if __name__=="__main__": + main() \ No newline at end of file diff --git a/setup.py b/setup.py index 449b9d6..bea7a02 100644 --- a/setup.py +++ b/setup.py @@ -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' + ], + }, ) \ No newline at end of file