diff --git a/bin/acore-docker-remove-build-cache b/bin/acore-docker-remove-build-cache index 817a18da3..d455f2a97 100755 --- a/bin/acore-docker-remove-build-cache +++ b/bin/acore-docker-remove-build-cache @@ -1,10 +1,14 @@ #!/usr/bin/env bash -sudo rm -rf ./docker/build/cache/CMakeFiles -sudo rm -rf ./docker/build/cache/deps -sudo rm -rf ./docker/build/cache/src -sudo rm ./docker/build/cache/*.cmake -sudo rm ./docker/build/cache/*.txt -sudo rm ./docker/build/cache/*.h -sudo rm ./docker/build/cache/*.cpp -sudo rm ./docker/build/cache/Makefile +if [ "$(id -u)" != "0" ] && [ "$OSTYPE" != "msys" ] ; then + echo "Please run the script with sudo" +else + rm -rf ./docker/build/cache/CMakeFiles + rm -rf ./docker/build/cache/deps + rm -rf ./docker/build/cache/src + rm ./docker/build/cache/*.cmake + rm ./docker/build/cache/*.txt + rm ./docker/build/cache/*.h + rm ./docker/build/cache/*.cpp + rm ./docker/build/cache/Makefile +fi