#!/bin/bash
#
# ********************************************************
#* Copyright (c) Scarlet Line 2009
#* Created on 2009-10-28 by Kevin Shepherd <code@scarletlne.com>
#* $URL$
#* $Id$
#**********************************************************/
#** \file check_npcml.sh
#	\brief Troubleshoot Molecular Viewer plugin installation.
#	
#	filename: check_npcml.sh
#
#	This shell script is used to troubleshoot the Molecular Viewer 
#	plugin installation.
#	To use it, do the following:
#	1) Open a terminal window
#	2) Check that this file has execute priviledge, e.g.:
#	chmod 777 ./check_npcml.sh
#	3) Run the file:
#	./check_npcml.sh
#	4) Email the resulting check_npcml.txt file to npcml@scarletline.com
#
echo "Running check_npcml.sh"
uname -a  > check_npcml.txt
date >> check_npcml.txt
ldd /home/*/.mozilla/firefox/*/extensions/npcml@scarletline.com/platform/*/plugins/libnpcml*.so >> check_npcml.txt
ldd /usr/lib/*/plugins/libnpcml*.so >> check_npcml.txt
echo "Checking complete."
echo "If you see any \"<name> => not found\" messages below, please find and install the relevant libraries"
echo "Otherwise, please e-mail the file check_npcml.txt to npcml@scarletline.com"
echo "Thank You"
echo ""
grep "not found" check_npcml.txt
echo "Missing libraries can be found and installed by running:"
echo "\"dpkg -S <name>\" to find the relevant package"
echo "and then, to install the package:"
echo "\"sudo apt-get install <package-name>\""

