Commits

Shrikant Sharat Kandula committed 669dcfd

`cd` should change pwd of further commands

  • Participants
  • Parent commits 4d9cb87

Comments (0)

Files changed (1)

             in_dest_dir = True
         for cmd in self.cmds:
             print cmd
-            sp.call(cmd, shell=True)
+            if cmd.startswith('cd'):
+                os.chdir(cmd[2:].strip(' "'))
+            else:
+                sp.call(cmd, shell=True)
             if not in_dest_dir and os.path.exists(self.dest_dir):
                 os.chdir(self.dest_dir)
                 in_dest_dir = True