#! /usr/bin/env python3

import os

from indy_client.script_helper import performIndyBaseDirCleanup
from indy_common.config_util import getConfig

config = getConfig()
baseDir = os.path.expanduser(config.CLI_BASE_DIR)

print("\nIMPORTANT: This will clean up indy base directory: {}".format(baseDir))
userAnswer = "no"
validAns = "YeS"
try:
    userAnswer = input(
        "\nAre you sure, type {} to continue: ".format(validAns))
except KeyboardInterrupt:
    pass

if userAnswer == validAns:
    performIndyBaseDirCleanup(baseDir)
    print("\nIndy base directory cleaned up.\n")
else:
    print("\nOk, no cleanup performed.\n")
