#!/bin/bash

##################################################
#
#   This script is originally created to install
#   dependecy packages to get Buypass smart card
#   readers to work in Linux.
#
#   Written by: orrie <code@orrie.org>
#   Web: http://projects.orrie.org
#   Contact: http://www.orrie.no/contact/
#
##################################################

echo "This script is about to install dependecy-packages that are needed to get the Buypass smart card reader to work in Linux.\n"
sudo apt-get install sun-java6-plugin pcscd libpcsclite-dev libccid -y
mkdir $HOME/buypass_card_install
cd $HOME/buypass_card_install/
wget http://www.buypass.no/support/linux/jnipcsc.tar.gz
tar -zxf jnipcsc.tar.gz
cd $HOME/buypass_card_install/jnipcsc/
sudo ./install.sh
rm -rf $HOME/buypass_card_install/
echo "Your smartcard reader should now work.\nTry to restart your browser.\nIf any problems, report it on http://www.orrie.no\n"

