#!/bin/sh
# This test uses the `type` command to check if package is installed.
# Tested on Fedora Linux x64
# Miscellaneous
B=`tput bold`
N=`tput sgr0`
# Package name
PACKAGENAME="git"
# Searching for package on system
FILEPATH="`type -P ${PACKAGENAME}`"
# Checking for package
if [ -z $FILEPATH ];
then
echo "The ${B}${PACKAGENAME}${N} package is not installed on your system."
else
echo "The ${B}${PACKAGENAME}${N} package is already installed at ${B}${FILEPATH}${N}"
fi