X-Git-Url: https://git.ao2.it/drupal-init-tools.git/blobdiff_plain/50b546739d6ba90d12b21700dcd02cebc07f0b7f..HEAD:/libexec/clean.sh diff --git a/libexec/clean.sh b/libexec/clean.sh index daa86fb..794e221 100755 --- a/libexec/clean.sh +++ b/libexec/clean.sh @@ -43,16 +43,18 @@ do shift done +[ -f "bootstrap.conf" ] || { echo "Aborting, run this command from the Drupal project directory." 1>&2; exit 1; } + CONFIRMATION_STRING="YESIAMSURE" echo "WARNING! This removes any files in the config/ web/ and vendor/ directories." echo "Are you sure you want to continue?" echo -read -p "Type ${CONFIRMATION_STRING} to confirm: " INPUT +read -r -p "Type ${CONFIRMATION_STRING} to confirm: " INPUT run() { echo "$@" "$@" } -[ "$INPUT" = "$CONFIRMATION_STRING" ] && run sudo rm -rf config/ web/ vendor/ composer.lock +[ "$INPUT" = "$CONFIRMATION_STRING" ] && run sudo --reset-timestamp rm -rf config/ web/ vendor/ composer.lock