diff options
author | Burt P <pburt0@gmail.com> | 2017-07-15 00:35:04 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-19 07:20:33 -0700 |
commit | 6ec5d0b90324367399d03a972f8b6a0f1bc804d5 (patch) | |
tree | b6f9bfad70ed4bd30023d90605832c8ee8ff040e /test | |
parent | e26ffa481c040f21b28ede1335194149faabb4c2 (diff) |
Add a tool to test/ that can be useful
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/rm_hardinfo.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/rm_hardinfo.sh b/test/rm_hardinfo.sh new file mode 100644 index 00000000..8cd58075 --- /dev/null +++ b/test/rm_hardinfo.sh @@ -0,0 +1,30 @@ +#!bash + +# when you just want it all gone. +# +# it is not smart in any way, and will screw up your package manager +# if hardinfo is installed as a package. + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root." + exit 1 +fi + +remove_hardinfo() { + BASEDER="$1" + echo "Removing hardinfo from $BASEDER ..." + rm -rf "$BASEDER/share/hardinfo" + rm -rf "$BASEDER/lib/hardinfo" + rm -f "$BASEDER"/share/locale/*/LC_MESSAGES/hardinfo.mo + rm -f "$BASEDER/bin/hardinfo" + rm -f "$BASEDER/share/applications/hardinfo.desktop" + rm -f "$BASEDER/share/doc/hardinfo" + rm -f "$BASEDER/share/man/man1/hardinfo.1.gz" + rm -f "$BASEDER/share/pixmaps/hardinfo.xpm" + rm -f "$BASEDER/share/menu/hardinfo" + #locate -e hardinfo | grep "$BASEDER" +} + +remove_hardinfo "/usr/local" +remove_hardinfo "/usr" +# add some other base install path here |