Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FILE install support #31

Merged
merged 2 commits into from Jul 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/framework.py
Expand Up @@ -197,13 +197,26 @@ def use_module(module, all_trigger):
print_error("Install did not complete. Printing error:\n" + error)
else:
print_status("Finished Installing! Enjoy the tool located under: " + install_location)
after_commands(filename,install_location)
after_commands(filename,install_location)

# if we are using svn
if install_type.lower() == "svn":
print_status("SVN was the selected method for installation... Using SVN to install.")
proc = subprocess.Popen("svn co %s %s" % (repository_location, install_location), stderr=subprocess.PIPE, shell=True)
print_status("Finished Installing! Enjoy the tool located under: " + install_location)
after_commands(filename,install_location)

# if we are using file
if install_type.lower() == "file":
print_status("FILE was the selected method for installation... Using curl -o to install.")
repository_file = repository_location.split("/")[-1]
proc = subprocess.Popen("curl -o %s%s %s" % (install_location, repository_file, repository_location), stderr=subprocess.PIPE, shell=True)
status = proc.stderr.read().rstrip()
if "Warning" in status:
print_error("Install did not complete. Printing error:\n" + error)
else:
print_status("Finished Installing! Enjoy the tool located under: " + install_location)
after_commands(filename,install_location)

# if we update all we need to break out until finished
if int(all_trigger) == 1: break
Expand Down