]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
bootstrap-depends nitpick: warn about rm -rf ~/.local
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 19 Jun 2017 16:01:46 +0000 (18:01 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 30 Jun 2017 06:25:16 +0000 (08:25 +0200)
Some people might get surprised, as it's the default location for quite
some data nowadays ($XDG_DATA_HOME).

scripts/bootstrap-depends.sh

index 459dcb3afc70e554b0368cd1fd051c81f9b9a647..cd3f6f0a598fbcf72a9ff135654944f9dce19cfd 100755 (executable)
@@ -44,11 +44,14 @@ PREFIX=${1}; [ -z ${PREFIX} ] && export PREFIX="${HOME}/.local"
 
 function bootstrap_cleanup {
     if [ -n "$BOOTSTRAP_CLEANUP" ]; then
-       echo "Bootstrap script has changed, cleaning up ${PREFIX}"
-       rm -rf "${PREFIX}"
+               echo "Bootstrap script has changed, cleaning up ${PREFIX}"
+               rm -rf "${PREFIX}"
     else
-       echo "Bootstrap script has changed, you should cleanup ${PREFIX}"
-       echo "or rerun this script with BOOSTRAP_CLEANUP=1 env variable"
+               echo "Bootstrap script has changed, you should cleanup ${PREFIX}"
+               echo "or rerun this script with BOOSTRAP_CLEANUP=1 env variable."
+               if [ "$PREFIX" = "$HOME/.local" ]; then
+                       echo "BEWARE: e.g. your ~/.local/share may contain something unrelated."
+               fi
     fi
 }