#!/usr/bin/env bash

# check below if VIRTUAL_ENV is set
# if [ -z "$VIRTUAL_ENV" ]; then
#   source ~/scripts/activate_ve ''
# fi
source ~/scripts/activate_ve ve  # this script only works under ve default ve.

op_script=$HOME/tmp_results/shells/python_return_command.sh
if [ -f "$op_script" ]; then
  rm $op_script
fi

python -m machineconfig.scripts.python.devops "$@"
if [ -f "$op_script" ]; then
  chmod +x $op_script
  source $op_script
fi


# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, other wise skip
if [ -n "$VIRTUAL_ENV" ]; then
  deactivate
fi
