aboutsummaryrefslogtreecommitdiffstats
path: root/tools/switch_wireshark_fedora.sh
blob: 9b97a8f7e9a3c696cb43990755f89f9bc4c33dd6 (plain) (blame)
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
#!/bin/sh

# Switch between svn and yum package installation of wireshark

wirsrc="$HOME/src/wireshark/"
wirpkg="wireshark wireshark-devel wireshark-gnome"

if [ $# -lt 1 ]; then
  echo "usage: `basename $0` svn|pkg"
  exit 1
fi

set -x

if [ $1 == "svn" ]; then
  sudo yum remove $wirpkg
  cd $wirsrc
  make -j 4
  sudo make install
elif [ $1 == "pkg" ]; then
  cd $wirsrc
  sudo make uninstall
  sudo yum install $wirpkg
  sudo usermod -a -G wireshark `whoami`
fi