#!/usr/bin/python

#---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------

from __future__ import print_function
import sys
import os
from subprocess import check_call, CalledProcessError

root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..'))

def exec_command(command):
    try:
        print('Executing: ' + command)
        check_call(command.split(), cwd=root_dir)
    except CalledProcessError as err:
        print(err, file=sys.stderr)
        sys.exit(1)

print('Running dev setup...')
print('Root directory \'{}\''.format(root_dir))
# command modules have dependency on azure-cli-core so install this first
exec_command('pip install -e src/azure-cli-core')
exec_command('python scripts/command_modules/install.py')
# azure cli has dependencies on the above packages so install this one last
exec_command('pip install -e src/azure-cli')
exec_command('pip install -r requirements.txt')
print('Finished dev setup.')

@@ -8,15 +8,19 @@
 bin/
+env 
 python%0A
-
 %0A#--
@@ -400,16 +400,17 @@
 unction%0A
+%0A
 import s
@@ -683,16 +683,32 @@
 ot_dir)%0A
+        print()%0A
     exce
@@ -852,16 +852,18 @@
 y %5C'%7B%7D%5C'
+%5Cn
 '.format
@@ -874,16 +874,17 @@
 t_dir))%0A
+%0A
 # comman
@@ -1057,16 +1057,17 @@
 ll.py')%0A
+%0A
 # azure 
@@ -1179,16 +1179,16 @@
 e-cli')%0A
-
 exec_com
@@ -1227,16 +1227,17 @@
 s.txt')%0A
+%0A
 print('F

Update dev_setup.py script