Added new logic for deployment scripts

Change-Id: Ifbdac9b9aecb3aded4fe3d2874514b6c56662dcc