Skip to content

Commit

Permalink
CST-10 znick#336 Moved cleanup.sh to settings.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailyumanov committed Mar 12, 2021
1 parent 45e2f78 commit 47a9331
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 46 deletions.
45 changes: 0 additions & 45 deletions deploy_local_beta/cleanup.sh

This file was deleted.

44 changes: 43 additions & 1 deletion deploy_local_beta/settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,48 @@ function ANYBETA_activate() {
. $ANYBETA_VENV_ACTIVATE
}

export -f ANYBETA_report ANYBETA_error ANYBETA_usage
function ANYBETA_cleanup() {
ANYBETA_SAVE_VENV=1

while (( "$#" )); do
case $1 in
-v|--rm-venv)
ANYBETA_SAVE_VENV=0
shift
;;
-h|--help)
echo "With flag -v|--rm-venv virtual env will be removed."
;;
*)
echo "Error: unknown parameter $1"
;;
esac
done

deactivate

if test $ANYBETA_SAVE_VENV -eq 0
then
rm -r $ANYBETA_VENV_DIR
unset ANYBETA_VENV_DIR
fi

unset ANYBETA_ROOT
unset ANYBETA_DEPLOY
unset ANYBETA_PYTHON_PATH
unset ANYBETA_VENV_NAME
unset ANYBETA_VENV_ACTIVATE
unset ANYBETA_REPORT_PREFIX
unset ANYBETA_ERROR_PREFIX
unset ANYBETA_SAVE_VENV
unset ANYBETA_correct_args

unset ANYBETA_report
unset ANYBETA_error
unset ANYBETA_usage
unset ANYBETA_activate
}

export -f ANYBETA_report ANYBETA_error ANYBETA_usage ANYBETA_activate


0 comments on commit 47a9331

Please sign in to comment.