summaryrefslogtreecommitdiff
path: root/test/rm_hardinfo.sh
blob: 8cd580754c2ff657e11920ffcf18891e6e2c1cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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