diff --git a/src/lib/Makefile b/src/lib/Makefile index 5a6c8635f70da5d6f7c58ac453b61c4ff644a3ff..07540fd657737845f89ff13f9f77fdf38824aa04 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -216,6 +216,17 @@ endif uninstall: + @echo WARNING + @echo I will remove the following files now + @echo "$(DESTDIR)$(libdir)/$(program_name)" + @echo "$(DESTDIR)$(htmldir)" + @echo "$(DESTDIR)$(includedir)/$(program_name)" + @echo "$(DESTDIR)$(bindir)/$(program_name)" + @echo "$(DESTDIR)$(bindir)/$(program_name)-patch" + @echo "$(DESTDIR)$(libdir)/lib$(program_name).$(SOEXT)" + @echo "$(DESTDIR)$(libdir)/lib$(program_name)Kernel.$(SOEXT)" + ../maketools/confirm_uninstall + @echo Removing previously installed files rm -fr "$(DESTDIR)$(libdir)/$(program_name)" rm -fr "$(DESTDIR)$(htmldir)" rm -fr "$(DESTDIR)$(includedir)/$(program_name)" diff --git a/src/maketools/confirm_uninstall b/src/maketools/confirm_uninstall new file mode 100755 index 0000000000000000000000000000000000000000..385febd271af841bd49c87d1a061213080a1f4c7 --- /dev/null +++ b/src/maketools/confirm_uninstall @@ -0,0 +1,18 @@ +#! /bin/bash + +confirm () { + # call with a prompt string or use a default + read -r -p "${1:-Are you sure? [y/N]} " response + case $response in + [yY][eE][sS]|[yY]) + true + ;; + *) + false + ;; + esac +} + +confirm "Are you shure that you want to Uninstall? This might lead to data loss! [y/N]" || exit 1 + +