#!/bin/bash
#
# Copyright (C) 2019-Present A-Team Digital Solutions
#

cd "$ROM_PATH" || exit 1

# Used For Testing variable additions
#env | sort | grep -E 'DEVICE|ROM|ANDROID|JOB|CCACHE'

echo 
echo "================================"
echo "ROM Clean Settings ..."
echo 
echo "Pre-Build Clean Variant: ${CLEAN_VARIANT^}"
echo "================================"
echo 
echo 
sleep 5
echo "Pre-Build Rom Clean Starting ..."
echo 
echo
# Source Build Env
#source build/envsetup.sh
# Lunch
#lunch ${ROM_BUILD_NAME}_${DEVICE_NAME}-${ROM_TARGET_RELEASE}-${BUILD_VARIANT}
# Clean
if [ "$CLEAN_VARIANT" = "full" ]; then
    export CLEAN_COMMAND="$M clean"
elif [ "$CLEAN_VARIANT" = "lite" ]; then
    export CLEAN_COMMAND="$M installclean"
elif [ "$CLEAN_VARIANT" = "none" ]; then
    echo "No Cleaning Selected ..."
fi

