#!/bin/bash
###############################################################################
# Copyright (C) Intel Corporation
#
# SPDX-License-Identifier: MIT
###############################################################################
# Unified Clean (Depricated, use e2e clean).

if [ -z "$BASH_VERSION" ]
then
  echo "This script must be run under bash"
  exit 1
fi

if [ "$0" = "$BASH_SOURCE" ]
then
  set -o errexit
else
  echo "Warning: This script should not be sourced. Skipping exit on error."
fi


# Set script folder
SCRIPT_DIR="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )"

## clean up install directory
if [ -n "${VPL_INSTALL_DIR}" ]; then 
  VPL_INSTALL_DIR=$(pwd)/_vplbuild
  export VPL_INSTALL_DIR
fi

"${SCRIPT_DIR}/e2e/clean" "$@"
