Skip to content

Commit

Permalink
adding setup.py for sshpass
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankarmadaan committed Aug 8, 2019
1 parent e1575c6 commit 9043871
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /usr/bin/env python
from __future__ import print_function
import subprocess

def main():
""" main function """
try:
print ("Installing dependencies...")
subprocess.call(['sudo', 'pip', 'install', '-r', 'requirements.txt'])
print ("Installing AWS CLI") # WINDOWS HAS NO SUDO
subprocess.call(['sudo', 'pip', 'install', 'awscli', '--ignore-installed', 'six'])
print ("Installing sshpass")
subprocess.call(['sudo', 'tar', '-xvf', 'sshpass-1.06.tar.gz'], cwd = './tools')
subprocess.check_output(['sudo', './configure'], cwd='tools/sshpass-1.06')
subprocess.call(['sudo', 'make', 'install'], cwd='tools/sshpass-1.06/')
print ("Please enter your AWS credetionals")
subprocess.call(['aws', 'configure'])
except:
print ("FAILED in one of the steps")

if __name__ == '__main__':
main()

0 comments on commit 9043871

Please sign in to comment.