summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPatrick Lewis <pat@lo5t.com>2020-12-02 14:24:20 -0800
committerGitHub <noreply@github.com>2020-12-02 16:24:20 -0600
commit55af77dbf92b07e3bf3c2c0fc068577a07f70c15 (patch)
tree7e9608afbe539c1bea7456f94e789e3c34f971ce /bin
parent8b45f2520d5966b53508c06b55b06482837af9e0 (diff)
fix(bin/scripts): Allow script work with git bash (#3841)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/acore-docker-remove-build-cache20
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/acore-docker-remove-build-cache b/bin/acore-docker-remove-build-cache
index 817a18da39..d455f2a976 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