From 723e7858bc74c5f36ba226366f3e5f8e93f6488f Mon Sep 17 00:00:00 2001 From: John Hood Date: Sat, 29 Oct 2016 21:05:25 -0400 Subject: [PATCH] Cleanup AppVeyor Git checkout more safely. --- appveyor.sh | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/appveyor.sh b/appveyor.sh index e3f2816..66e2185 100755 --- a/appveyor.sh +++ b/appveyor.sh @@ -2,12 +2,6 @@ # # Cleanup for Appveyor peculiarities. # -# This thing is dangerous. See "rm -rf *". It tries hard, but if it -# gets it wrong you will not be happy. -# -# Only run this on an Appveyor instance, where the consequences are -# nil. -# # Echo, eval, and error on shell commands. eeval() @@ -31,26 +25,12 @@ exec 0&2 - exit 2 -fi - -# Make really, really sure we're in the build dir -cd $APPVEYOR_BUILD_FOLDER || exit 2 -if [ "$(pwd)" = "$HOME" -o "$PWD" = "$HOME" ]; then - echo "$0: in home directory" >&2 - exit 2 -fi - -set -e - case $1 in before_build) - # Check that we're in a Mosh repo with mosh-1.2.5, then clean it mercilessly + # This repo was checked out with Windows Git, repair it for Cygwin. eeval git config --local core.symlinks true - eeval "git describe 3c3b356cb5e387887499beb2eedddce185f36944 && rm -rf * && git reset --hard" + eeval git clean --force --quiet -x -d + eeval git reset --hard ;; build_script) eeval ./autogen.sh